{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
    "<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#单只基金持仓\" data-toc-modified-id=\"单只基金持仓-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>单只基金持仓</a></span><ul class=\"toc-item\"><li><span><a href=\"#分步骤\" data-toc-modified-id=\"分步骤-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>分步骤</a></span></li><li><span><a href=\"#自定义函数封装\" data-toc-modified-id=\"自定义函数封装-1.2\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>自定义函数封装</a></span></li></ul></li><li><span><a href=\"#多只基金持仓\" data-toc-modified-id=\"多只基金持仓-2\"><span class=\"toc-item-num\">2&nbsp;&nbsp;</span>多只基金持仓</a></span></li></ul></div>"
   ],
   "metadata": {
    "toc": true
   }
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "source": [
    "import akshare as ak\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "print(f'pandas version: {pd.__version__}')\n",
    "print(f'akshare version: {ak.__version__}')"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "pandas version: 1.3.2\n",
      "akshare version: 1.0.91\n"
     ]
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 单只基金持仓\n",
    "\n",
    "### 分步骤"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "source": [
    "# 易方达蓝筹精选，005827\n",
    "# 前海开源公共事业股票，005669\n",
    "years = ['2019','2020','2021']\n",
    "\n",
    "data = pd.DataFrame()\n",
    "for yr in years:\n",
    "    df_tmp = ak.fund_em_portfolio_hold(code=\"005827\",year=yr)\n",
    "    data = data.append(df_tmp)\n",
    "\n",
    "data['季度']=data['季度'].apply(lambda x:x[:6])\n",
    "data['季度'] = data['季度'].str.replace('年','Q')\n",
    "data['占净值比例'] = pd.to_numeric(data['占净值比例'])\n",
    "data"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>占净值比例</th>\n",
       "      <th>持股数</th>\n",
       "      <th>持仓市值</th>\n",
       "      <th>季度</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>000700</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>10.05</td>\n",
       "      <td>251.50</td>\n",
       "      <td>84618.42</td>\n",
       "      <td>2019Q4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>000568</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>9.96</td>\n",
       "      <td>968.00</td>\n",
       "      <td>83906.24</td>\n",
       "      <td>2019Q4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>001177</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>9.79</td>\n",
       "      <td>8448.10</td>\n",
       "      <td>82487.27</td>\n",
       "      <td>2019Q4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>000858</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>9.77</td>\n",
       "      <td>619.01</td>\n",
       "      <td>82333.96</td>\n",
       "      <td>2019Q4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>600519</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>9.73</td>\n",
       "      <td>69.26</td>\n",
       "      <td>81938.84</td>\n",
       "      <td>2019Q4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>11</td>\n",
       "      <td>003968</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>2.85</td>\n",
       "      <td>5000.00</td>\n",
       "      <td>250807.17</td>\n",
       "      <td>2021Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>104</th>\n",
       "      <td>12*</td>\n",
       "      <td>002007</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>2.80</td>\n",
       "      <td>6200.01</td>\n",
       "      <td>246450.43</td>\n",
       "      <td>2021Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>13*</td>\n",
       "      <td>002044</td>\n",
       "      <td>美年健康</td>\n",
       "      <td>1.87</td>\n",
       "      <td>10660.01</td>\n",
       "      <td>164377.28</td>\n",
       "      <td>2021Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>14*</td>\n",
       "      <td>600872</td>\n",
       "      <td>中炬高新</td>\n",
       "      <td>1.71</td>\n",
       "      <td>3100.01</td>\n",
       "      <td>150133.56</td>\n",
       "      <td>2021Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>15*</td>\n",
       "      <td>600161</td>\n",
       "      <td>天坛生物</td>\n",
       "      <td>0.59</td>\n",
       "      <td>1600.01</td>\n",
       "      <td>52256.47</td>\n",
       "      <td>2021Q1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>338 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      序号    股票代码    股票名称  占净值比例       持股数       持仓市值      季度\n",
       "0      1  000700    腾讯控股  10.05    251.50   84618.42  2019Q4\n",
       "1      2  000568    泸州老窖   9.96    968.00   83906.24  2019Q4\n",
       "2      3  001177  中国生物制药   9.79   8448.10   82487.27  2019Q4\n",
       "3      4  000858     五粮液   9.77    619.01   82333.96  2019Q4\n",
       "4      5  600519    贵州茅台   9.73     69.26   81938.84  2019Q4\n",
       "..   ...     ...     ...    ...       ...        ...     ...\n",
       "103   11  003968    招商银行   2.85   5000.00  250807.17  2021Q1\n",
       "104  12*  002007    华兰生物   2.80   6200.01  246450.43  2021Q1\n",
       "105  13*  002044    美年健康   1.87  10660.01  164377.28  2021Q1\n",
       "106  14*  600872    中炬高新   1.71   3100.01  150133.56  2021Q1\n",
       "107  15*  600161    天坛生物   0.59   1600.01   52256.47  2021Q1\n",
       "\n",
       "[338 rows x 7 columns]"
      ]
     },
     "metadata": {},
     "execution_count": 2
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "source": [
    "s1 = '2021Q1'\n",
    "s2 = '2021Q2'\n",
    "s1_share = s1+'持股数'\n",
    "s2_share = s2+'持股数'\n",
    "s1_value = s1+'持仓市值'\n",
    "s2_value = s2+'持仓市值'\n",
    "s1_ratio = s1+'持仓比例'\n",
    "s2_ratio = s2+'持仓比例'\n",
    "\n",
    "df1 =data[data['季度']==s1]\n",
    "df1 = df1[['股票代码', '股票名称','持股数','持仓市值','占净值比例']]\n",
    "df1 = df1.rename(columns={'持股数':s1_share,'持仓市值':s1_value,'占净值比例':s1_ratio})\n",
    "df2 =data[data['季度']==s2]\n",
    "df2 = df2[['股票代码', '股票名称','持股数','持仓市值','占净值比例']]\n",
    "df2 = df2.rename(columns={'持股数':s2_share,'持仓市值':s2_value,'占净值比例':s2_ratio})\n",
    "df1"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>2021Q1持股数</th>\n",
       "      <th>2021Q1持仓市值</th>\n",
       "      <th>2021Q1持仓比例</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>000858</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>3300.00</td>\n",
       "      <td>884334.00</td>\n",
       "      <td>10.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>000388</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>2286.00</td>\n",
       "      <td>883734.07</td>\n",
       "      <td>10.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>600519</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>432.00</td>\n",
       "      <td>867888.00</td>\n",
       "      <td>9.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>003690</td>\n",
       "      <td>美团-W</td>\n",
       "      <td>3370.43</td>\n",
       "      <td>849458.49</td>\n",
       "      <td>9.65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>000700</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>1610.00</td>\n",
       "      <td>830051.28</td>\n",
       "      <td>9.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>000568</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>2980.00</td>\n",
       "      <td>670560.59</td>\n",
       "      <td>7.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>600036</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>11300.00</td>\n",
       "      <td>577430.00</td>\n",
       "      <td>6.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>002415</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>9000.02</td>\n",
       "      <td>503100.89</td>\n",
       "      <td>5.72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>002304</td>\n",
       "      <td>洋河股份</td>\n",
       "      <td>2500.02</td>\n",
       "      <td>411753.21</td>\n",
       "      <td>4.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>102</th>\n",
       "      <td>000001</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>13000.00</td>\n",
       "      <td>286130.00</td>\n",
       "      <td>3.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>003968</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>5000.00</td>\n",
       "      <td>250807.17</td>\n",
       "      <td>2.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>104</th>\n",
       "      <td>002007</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>6200.01</td>\n",
       "      <td>246450.43</td>\n",
       "      <td>2.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>002044</td>\n",
       "      <td>美年健康</td>\n",
       "      <td>10660.01</td>\n",
       "      <td>164377.28</td>\n",
       "      <td>1.87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>600872</td>\n",
       "      <td>中炬高新</td>\n",
       "      <td>3100.01</td>\n",
       "      <td>150133.56</td>\n",
       "      <td>1.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>600161</td>\n",
       "      <td>天坛生物</td>\n",
       "      <td>1600.01</td>\n",
       "      <td>52256.47</td>\n",
       "      <td>0.59</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       股票代码   股票名称  2021Q1持股数  2021Q1持仓市值  2021Q1持仓比例\n",
       "93   000858    五粮液    3300.00   884334.00       10.05\n",
       "94   000388  香港交易所    2286.00   883734.07       10.04\n",
       "95   600519   贵州茅台     432.00   867888.00        9.86\n",
       "96   003690   美团-W    3370.43   849458.49        9.65\n",
       "97   000700   腾讯控股    1610.00   830051.28        9.43\n",
       "98   000568   泸州老窖    2980.00   670560.59        7.62\n",
       "99   600036   招商银行   11300.00   577430.00        6.56\n",
       "100  002415   海康威视    9000.02   503100.89        5.72\n",
       "101  002304   洋河股份    2500.02   411753.21        4.68\n",
       "102  000001   平安银行   13000.00   286130.00        3.25\n",
       "103  003968   招商银行    5000.00   250807.17        2.85\n",
       "104  002007   华兰生物    6200.01   246450.43        2.80\n",
       "105  002044   美年健康   10660.01   164377.28        1.87\n",
       "106  600872   中炬高新    3100.01   150133.56        1.71\n",
       "107  600161   天坛生物    1600.01    52256.47        0.59"
      ]
     },
     "metadata": {},
     "execution_count": 3
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "source": [
    "df_merge = pd.merge(df1,df2,on='股票代码',how='outer')\n",
    "\n",
    "# Q2 和 Q4，即半年度和年度报告，是需要披露全部持仓的\n",
    "# 合并后，在dataframe 中 NaN 的数据应为 0 \n",
    "if s1.endswith('Q2') or s1.endswith('Q4'):\n",
    "    df_merge[s1_share] = df_merge[s1_share].fillna(0)\n",
    "    df_merge[s1_value] = df_merge[s1_value].fillna(0)\n",
    "    df_merge[s1_ratio] = df_merge[s1_ratio].fillna(0)\n",
    "\n",
    "if s2.endswith('Q2') or s2.endswith('Q4'):\n",
    "    df_merge[s2_share] = df_merge[s2_share].fillna(0)\n",
    "    df_merge[s2_value] = df_merge[s2_value].fillna(0)\n",
    "    df_merge[s2_ratio] = df_merge[s2_ratio].fillna(0)\n",
    "\n",
    "\n",
    "df_merge['持股数变化'] = df_merge[s2_share] - df_merge[s1_share]\n",
    "df_merge = df_merge.sort_values(s2_value,ascending=False)\n",
    "\n",
    "\n",
    "df_merge['股票名称'] = df_merge['股票名称_y']\n",
    "# df_merge['股票名称'] = df_merge['股票名称'].fillna('0')\n",
    "# df_merge.loc[df_merge['股票名称']=='0','股票名称'] = df_merge.loc[df_merge['股票名称']=='0','股票名称_x']\n",
    "df_merge.loc[df_merge['股票名称'].isna(),'股票名称'] = df_merge.loc[df_merge['股票名称'].isna(),'股票名称_x']\n",
    "df_merge = df_merge[['股票代码', '股票名称', s1_share, \n",
    "                     s1_value, s1_ratio, \n",
    "                     s2_share,s2_value, \n",
    "                     s2_ratio, '持股数变化']]\n",
    "\n",
    "df_merge"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>2021Q1持股数</th>\n",
       "      <th>2021Q1持仓市值</th>\n",
       "      <th>2021Q1持仓比例</th>\n",
       "      <th>2021Q2持股数</th>\n",
       "      <th>2021Q2持仓市值</th>\n",
       "      <th>2021Q2持仓比例</th>\n",
       "      <th>持股数变化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000388</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>2286.00</td>\n",
       "      <td>883734.07</td>\n",
       "      <td>10.04</td>\n",
       "      <td>2310.00</td>\n",
       "      <td>889550.10</td>\n",
       "      <td>9.90</td>\n",
       "      <td>24.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000858</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>3300.00</td>\n",
       "      <td>884334.00</td>\n",
       "      <td>10.05</td>\n",
       "      <td>2980.00</td>\n",
       "      <td>887712.20</td>\n",
       "      <td>9.88</td>\n",
       "      <td>-320.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>000700</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>1610.00</td>\n",
       "      <td>830051.28</td>\n",
       "      <td>9.43</td>\n",
       "      <td>1810.00</td>\n",
       "      <td>879541.84</td>\n",
       "      <td>9.78</td>\n",
       "      <td>200.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>600519</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>432.00</td>\n",
       "      <td>867888.00</td>\n",
       "      <td>9.86</td>\n",
       "      <td>426.00</td>\n",
       "      <td>876154.20</td>\n",
       "      <td>9.75</td>\n",
       "      <td>-6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>000568</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>2980.00</td>\n",
       "      <td>670560.59</td>\n",
       "      <td>7.62</td>\n",
       "      <td>3700.01</td>\n",
       "      <td>872980.71</td>\n",
       "      <td>9.71</td>\n",
       "      <td>720.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>301012</td>\n",
       "      <td>扬电科技</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.41</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>301010</td>\n",
       "      <td>晶雪节能</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.38</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>002044</td>\n",
       "      <td>美年健康</td>\n",
       "      <td>10660.01</td>\n",
       "      <td>164377.28</td>\n",
       "      <td>1.87</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-10660.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>002007</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>6200.01</td>\n",
       "      <td>246450.43</td>\n",
       "      <td>2.80</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-6200.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>600872</td>\n",
       "      <td>中炬高新</td>\n",
       "      <td>3100.01</td>\n",
       "      <td>150133.56</td>\n",
       "      <td>1.71</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-3100.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>96 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      股票代码   股票名称  2021Q1持股数  2021Q1持仓市值  2021Q1持仓比例  2021Q2持股数  2021Q2持仓市值  \\\n",
       "1   000388  香港交易所    2286.00   883734.07       10.04    2310.00   889550.10   \n",
       "0   000858    五粮液    3300.00   884334.00       10.05    2980.00   887712.20   \n",
       "4   000700   腾讯控股    1610.00   830051.28        9.43    1810.00   879541.84   \n",
       "2   600519   贵州茅台     432.00   867888.00        9.86     426.00   876154.20   \n",
       "5   000568   泸州老窖    2980.00   670560.59        7.62    3700.01   872980.71   \n",
       "..     ...    ...        ...         ...         ...        ...         ...   \n",
       "93  301012   扬电科技        NaN         NaN         NaN       0.02        0.41   \n",
       "95  301010   晶雪节能        NaN         NaN         NaN       0.02        0.38   \n",
       "12  002044   美年健康   10660.01   164377.28        1.87       0.00        0.00   \n",
       "11  002007   华兰生物    6200.01   246450.43        2.80       0.00        0.00   \n",
       "13  600872   中炬高新    3100.01   150133.56        1.71       0.00        0.00   \n",
       "\n",
       "    2021Q2持仓比例     持股数变化  \n",
       "1         9.90     24.00  \n",
       "0         9.88   -320.00  \n",
       "4         9.78    200.00  \n",
       "2         9.75     -6.00  \n",
       "5         9.71    720.01  \n",
       "..         ...       ...  \n",
       "93        0.00       NaN  \n",
       "95        0.00       NaN  \n",
       "12        0.00 -10660.01  \n",
       "11        0.00  -6200.01  \n",
       "13        0.00  -3100.01  \n",
       "\n",
       "[96 rows x 9 columns]"
      ]
     },
     "metadata": {},
     "execution_count": 4
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "source": [
    "format_dict = {s1_share: '{0:.2f}', s2_share: '{0:.2f}', \n",
    "               s1_value: '{0:.0f}', s2_value: '{0:.0f}',\n",
    "               s1_ratio: '{0:.2f}', s2_ratio: '{0:.2f}', \n",
    "               '持股数变化': '{0:.2f}'}\n",
    "\n",
    "df_merge.style.hide_index()\\\n",
    "                .hide_columns(['股票代码'])\\\n",
    "                .format(format_dict)\\\n",
    "                .bar(subset=['持股数变化'],color=['#99ff66','#ee7621'],align='mid')"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_936bc_row0_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 86.4%, transparent 86.4%);\n",
       "}\n",
       "#T_936bc_row1_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 83.7%, #99ff66 83.7%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row2_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 87.9%, transparent 87.9%);\n",
       "}\n",
       "#T_936bc_row3_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #99ff66 86.2%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row4_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 92.1%, transparent 92.1%);\n",
       "}\n",
       "#T_936bc_row5_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 100.0%, transparent 100.0%);\n",
       "}\n",
       "#T_936bc_row6_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 81.6%, #99ff66 81.6%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row7_col8, #T_936bc_row8_col8, #T_936bc_row9_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "}\n",
       "#T_936bc_row11_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 55.5%, #99ff66 55.5%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row16_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 76.6%, #99ff66 76.6%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row93_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg,#99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row94_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 36.1%, #99ff66 36.1%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_936bc_row95_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 61.2%, #99ff66 61.2%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_936bc_\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"col_heading level0 col1\" >股票名称</th>\n",
       "      <th class=\"col_heading level0 col2\" >2021Q1持股数</th>\n",
       "      <th class=\"col_heading level0 col3\" >2021Q1持仓市值</th>\n",
       "      <th class=\"col_heading level0 col4\" >2021Q1持仓比例</th>\n",
       "      <th class=\"col_heading level0 col5\" >2021Q2持股数</th>\n",
       "      <th class=\"col_heading level0 col6\" >2021Q2持仓市值</th>\n",
       "      <th class=\"col_heading level0 col7\" >2021Q2持仓比例</th>\n",
       "      <th class=\"col_heading level0 col8\" >持股数变化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row0_col1\" class=\"data row0 col1\" >香港交易所</td>\n",
       "      <td id=\"T_936bc_row0_col2\" class=\"data row0 col2\" >2286.00</td>\n",
       "      <td id=\"T_936bc_row0_col3\" class=\"data row0 col3\" >883734</td>\n",
       "      <td id=\"T_936bc_row0_col4\" class=\"data row0 col4\" >10.04</td>\n",
       "      <td id=\"T_936bc_row0_col5\" class=\"data row0 col5\" >2310.00</td>\n",
       "      <td id=\"T_936bc_row0_col6\" class=\"data row0 col6\" >889550</td>\n",
       "      <td id=\"T_936bc_row0_col7\" class=\"data row0 col7\" >9.90</td>\n",
       "      <td id=\"T_936bc_row0_col8\" class=\"data row0 col8\" >24.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row1_col1\" class=\"data row1 col1\" >五粮液</td>\n",
       "      <td id=\"T_936bc_row1_col2\" class=\"data row1 col2\" >3300.00</td>\n",
       "      <td id=\"T_936bc_row1_col3\" class=\"data row1 col3\" >884334</td>\n",
       "      <td id=\"T_936bc_row1_col4\" class=\"data row1 col4\" >10.05</td>\n",
       "      <td id=\"T_936bc_row1_col5\" class=\"data row1 col5\" >2980.00</td>\n",
       "      <td id=\"T_936bc_row1_col6\" class=\"data row1 col6\" >887712</td>\n",
       "      <td id=\"T_936bc_row1_col7\" class=\"data row1 col7\" >9.88</td>\n",
       "      <td id=\"T_936bc_row1_col8\" class=\"data row1 col8\" >-320.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row2_col1\" class=\"data row2 col1\" >腾讯控股</td>\n",
       "      <td id=\"T_936bc_row2_col2\" class=\"data row2 col2\" >1610.00</td>\n",
       "      <td id=\"T_936bc_row2_col3\" class=\"data row2 col3\" >830051</td>\n",
       "      <td id=\"T_936bc_row2_col4\" class=\"data row2 col4\" >9.43</td>\n",
       "      <td id=\"T_936bc_row2_col5\" class=\"data row2 col5\" >1810.00</td>\n",
       "      <td id=\"T_936bc_row2_col6\" class=\"data row2 col6\" >879542</td>\n",
       "      <td id=\"T_936bc_row2_col7\" class=\"data row2 col7\" >9.78</td>\n",
       "      <td id=\"T_936bc_row2_col8\" class=\"data row2 col8\" >200.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row3_col1\" class=\"data row3 col1\" >贵州茅台</td>\n",
       "      <td id=\"T_936bc_row3_col2\" class=\"data row3 col2\" >432.00</td>\n",
       "      <td id=\"T_936bc_row3_col3\" class=\"data row3 col3\" >867888</td>\n",
       "      <td id=\"T_936bc_row3_col4\" class=\"data row3 col4\" >9.86</td>\n",
       "      <td id=\"T_936bc_row3_col5\" class=\"data row3 col5\" >426.00</td>\n",
       "      <td id=\"T_936bc_row3_col6\" class=\"data row3 col6\" >876154</td>\n",
       "      <td id=\"T_936bc_row3_col7\" class=\"data row3 col7\" >9.75</td>\n",
       "      <td id=\"T_936bc_row3_col8\" class=\"data row3 col8\" >-6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row4_col1\" class=\"data row4 col1\" >泸州老窖</td>\n",
       "      <td id=\"T_936bc_row4_col2\" class=\"data row4 col2\" >2980.00</td>\n",
       "      <td id=\"T_936bc_row4_col3\" class=\"data row4 col3\" >670561</td>\n",
       "      <td id=\"T_936bc_row4_col4\" class=\"data row4 col4\" >7.62</td>\n",
       "      <td id=\"T_936bc_row4_col5\" class=\"data row4 col5\" >3700.01</td>\n",
       "      <td id=\"T_936bc_row4_col6\" class=\"data row4 col6\" >872981</td>\n",
       "      <td id=\"T_936bc_row4_col7\" class=\"data row4 col7\" >9.71</td>\n",
       "      <td id=\"T_936bc_row4_col8\" class=\"data row4 col8\" >720.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row5_col1\" class=\"data row5 col1\" >洋河股份</td>\n",
       "      <td id=\"T_936bc_row5_col2\" class=\"data row5 col2\" >2500.02</td>\n",
       "      <td id=\"T_936bc_row5_col3\" class=\"data row5 col3\" >411753</td>\n",
       "      <td id=\"T_936bc_row5_col4\" class=\"data row5 col4\" >4.68</td>\n",
       "      <td id=\"T_936bc_row5_col5\" class=\"data row5 col5\" >4200.01</td>\n",
       "      <td id=\"T_936bc_row5_col6\" class=\"data row5 col6\" >870241</td>\n",
       "      <td id=\"T_936bc_row5_col7\" class=\"data row5 col7\" >9.68</td>\n",
       "      <td id=\"T_936bc_row5_col8\" class=\"data row5 col8\" >1699.99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row6_col1\" class=\"data row6 col1\" >美团-W</td>\n",
       "      <td id=\"T_936bc_row6_col2\" class=\"data row6 col2\" >3370.43</td>\n",
       "      <td id=\"T_936bc_row6_col3\" class=\"data row6 col3\" >849458</td>\n",
       "      <td id=\"T_936bc_row6_col4\" class=\"data row6 col4\" >9.65</td>\n",
       "      <td id=\"T_936bc_row6_col5\" class=\"data row6 col5\" >2800.00</td>\n",
       "      <td id=\"T_936bc_row6_col6\" class=\"data row6 col6\" >746476</td>\n",
       "      <td id=\"T_936bc_row6_col7\" class=\"data row6 col7\" >8.30</td>\n",
       "      <td id=\"T_936bc_row6_col8\" class=\"data row6 col8\" >-570.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row7_col1\" class=\"data row7 col1\" >招商银行</td>\n",
       "      <td id=\"T_936bc_row7_col2\" class=\"data row7 col2\" >11300.00</td>\n",
       "      <td id=\"T_936bc_row7_col3\" class=\"data row7 col3\" >577430</td>\n",
       "      <td id=\"T_936bc_row7_col4\" class=\"data row7 col4\" >6.56</td>\n",
       "      <td id=\"T_936bc_row7_col5\" class=\"data row7 col5\" >11300.00</td>\n",
       "      <td id=\"T_936bc_row7_col6\" class=\"data row7 col6\" >612347</td>\n",
       "      <td id=\"T_936bc_row7_col7\" class=\"data row7 col7\" >6.81</td>\n",
       "      <td id=\"T_936bc_row7_col8\" class=\"data row7 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row8_col1\" class=\"data row8 col1\" >海康威视</td>\n",
       "      <td id=\"T_936bc_row8_col2\" class=\"data row8 col2\" >9000.02</td>\n",
       "      <td id=\"T_936bc_row8_col3\" class=\"data row8 col3\" >503101</td>\n",
       "      <td id=\"T_936bc_row8_col4\" class=\"data row8 col4\" >5.72</td>\n",
       "      <td id=\"T_936bc_row8_col5\" class=\"data row8 col5\" >9000.02</td>\n",
       "      <td id=\"T_936bc_row8_col6\" class=\"data row8 col6\" >580501</td>\n",
       "      <td id=\"T_936bc_row8_col7\" class=\"data row8 col7\" >6.46</td>\n",
       "      <td id=\"T_936bc_row8_col8\" class=\"data row8 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row9_col1\" class=\"data row9 col1\" >招商银行</td>\n",
       "      <td id=\"T_936bc_row9_col2\" class=\"data row9 col2\" >5000.00</td>\n",
       "      <td id=\"T_936bc_row9_col3\" class=\"data row9 col3\" >250807</td>\n",
       "      <td id=\"T_936bc_row9_col4\" class=\"data row9 col4\" >2.85</td>\n",
       "      <td id=\"T_936bc_row9_col5\" class=\"data row9 col5\" >5000.00</td>\n",
       "      <td id=\"T_936bc_row9_col6\" class=\"data row9 col6\" >275626</td>\n",
       "      <td id=\"T_936bc_row9_col7\" class=\"data row9 col7\" >3.07</td>\n",
       "      <td id=\"T_936bc_row9_col8\" class=\"data row9 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row10_col1\" class=\"data row10 col1\" >爱尔眼科</td>\n",
       "      <td id=\"T_936bc_row10_col2\" class=\"data row10 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row10_col3\" class=\"data row10 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row10_col4\" class=\"data row10 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row10_col5\" class=\"data row10 col5\" >3500.79</td>\n",
       "      <td id=\"T_936bc_row10_col6\" class=\"data row10 col6\" >248486</td>\n",
       "      <td id=\"T_936bc_row10_col7\" class=\"data row10 col7\" >2.76</td>\n",
       "      <td id=\"T_936bc_row10_col8\" class=\"data row10 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row11_col1\" class=\"data row11 col1\" >平安银行</td>\n",
       "      <td id=\"T_936bc_row11_col2\" class=\"data row11 col2\" >13000.00</td>\n",
       "      <td id=\"T_936bc_row11_col3\" class=\"data row11 col3\" >286130</td>\n",
       "      <td id=\"T_936bc_row11_col4\" class=\"data row11 col4\" >3.25</td>\n",
       "      <td id=\"T_936bc_row11_col5\" class=\"data row11 col5\" >9200.00</td>\n",
       "      <td id=\"T_936bc_row11_col6\" class=\"data row11 col6\" >208104</td>\n",
       "      <td id=\"T_936bc_row11_col7\" class=\"data row11 col7\" >2.32</td>\n",
       "      <td id=\"T_936bc_row11_col8\" class=\"data row11 col8\" >-3800.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row12_col1\" class=\"data row12 col1\" >锦欣生殖(五百)</td>\n",
       "      <td id=\"T_936bc_row12_col2\" class=\"data row12 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row12_col3\" class=\"data row12 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row12_col4\" class=\"data row12 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row12_col5\" class=\"data row12 col5\" >11600.00</td>\n",
       "      <td id=\"T_936bc_row12_col6\" class=\"data row12 col6\" >189182</td>\n",
       "      <td id=\"T_936bc_row12_col7\" class=\"data row12 col7\" >2.10</td>\n",
       "      <td id=\"T_936bc_row12_col8\" class=\"data row12 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row13_col1\" class=\"data row13 col1\" >通策医疗</td>\n",
       "      <td id=\"T_936bc_row13_col2\" class=\"data row13 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row13_col3\" class=\"data row13 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row13_col4\" class=\"data row13 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row13_col5\" class=\"data row13 col5\" >150.02</td>\n",
       "      <td id=\"T_936bc_row13_col6\" class=\"data row13 col6\" >61658</td>\n",
       "      <td id=\"T_936bc_row13_col7\" class=\"data row13 col7\" >0.69</td>\n",
       "      <td id=\"T_936bc_row13_col8\" class=\"data row13 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row14_col1\" class=\"data row14 col1\" >海吉亚医疗</td>\n",
       "      <td id=\"T_936bc_row14_col2\" class=\"data row14 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row14_col3\" class=\"data row14 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row14_col4\" class=\"data row14 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row14_col5\" class=\"data row14 col5\" >550.00</td>\n",
       "      <td id=\"T_936bc_row14_col6\" class=\"data row14 col6\" >46680</td>\n",
       "      <td id=\"T_936bc_row14_col7\" class=\"data row14 col7\" >0.52</td>\n",
       "      <td id=\"T_936bc_row14_col8\" class=\"data row14 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row15_col1\" class=\"data row15 col1\" >百润股份</td>\n",
       "      <td id=\"T_936bc_row15_col2\" class=\"data row15 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row15_col3\" class=\"data row15 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row15_col4\" class=\"data row15 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row15_col5\" class=\"data row15 col5\" >250.01</td>\n",
       "      <td id=\"T_936bc_row15_col6\" class=\"data row15 col6\" >23698</td>\n",
       "      <td id=\"T_936bc_row15_col7\" class=\"data row15 col7\" >0.26</td>\n",
       "      <td id=\"T_936bc_row15_col8\" class=\"data row15 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row16_col1\" class=\"data row16 col1\" >天坛生物</td>\n",
       "      <td id=\"T_936bc_row16_col2\" class=\"data row16 col2\" >1600.01</td>\n",
       "      <td id=\"T_936bc_row16_col3\" class=\"data row16 col3\" >52256</td>\n",
       "      <td id=\"T_936bc_row16_col4\" class=\"data row16 col4\" >0.59</td>\n",
       "      <td id=\"T_936bc_row16_col5\" class=\"data row16 col5\" >410.00</td>\n",
       "      <td id=\"T_936bc_row16_col6\" class=\"data row16 col6\" >13478</td>\n",
       "      <td id=\"T_936bc_row16_col7\" class=\"data row16 col7\" >0.15</td>\n",
       "      <td id=\"T_936bc_row16_col8\" class=\"data row16 col8\" >-1190.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row17_col1\" class=\"data row17 col1\" >金蝶国际</td>\n",
       "      <td id=\"T_936bc_row17_col2\" class=\"data row17 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row17_col3\" class=\"data row17 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row17_col4\" class=\"data row17 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row17_col5\" class=\"data row17 col5\" >300.00</td>\n",
       "      <td id=\"T_936bc_row17_col6\" class=\"data row17 col6\" >6578</td>\n",
       "      <td id=\"T_936bc_row17_col7\" class=\"data row17 col7\" >0.07</td>\n",
       "      <td id=\"T_936bc_row17_col8\" class=\"data row17 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row18_col1\" class=\"data row18 col1\" >三棵树</td>\n",
       "      <td id=\"T_936bc_row18_col2\" class=\"data row18 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row18_col3\" class=\"data row18 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row18_col4\" class=\"data row18 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row18_col5\" class=\"data row18 col5\" >10.01</td>\n",
       "      <td id=\"T_936bc_row18_col6\" class=\"data row18 col6\" >1762</td>\n",
       "      <td id=\"T_936bc_row18_col7\" class=\"data row18 col7\" >0.02</td>\n",
       "      <td id=\"T_936bc_row18_col8\" class=\"data row18 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row19_col1\" class=\"data row19 col1\" >恒生电子</td>\n",
       "      <td id=\"T_936bc_row19_col2\" class=\"data row19 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row19_col3\" class=\"data row19 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row19_col4\" class=\"data row19 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row19_col5\" class=\"data row19 col5\" >10.01</td>\n",
       "      <td id=\"T_936bc_row19_col6\" class=\"data row19 col6\" >933</td>\n",
       "      <td id=\"T_936bc_row19_col7\" class=\"data row19 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row19_col8\" class=\"data row19 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row20_col1\" class=\"data row20 col1\" >京东健康</td>\n",
       "      <td id=\"T_936bc_row20_col2\" class=\"data row20 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row20_col3\" class=\"data row20 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row20_col4\" class=\"data row20 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row20_col5\" class=\"data row20 col5\" >10.00</td>\n",
       "      <td id=\"T_936bc_row20_col6\" class=\"data row20 col6\" >926</td>\n",
       "      <td id=\"T_936bc_row20_col7\" class=\"data row20 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row20_col8\" class=\"data row20 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row21_col1\" class=\"data row21 col1\" >片仔癀</td>\n",
       "      <td id=\"T_936bc_row21_col2\" class=\"data row21 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row21_col3\" class=\"data row21 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row21_col4\" class=\"data row21 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row21_col5\" class=\"data row21 col5\" >2.00</td>\n",
       "      <td id=\"T_936bc_row21_col6\" class=\"data row21 col6\" >897</td>\n",
       "      <td id=\"T_936bc_row21_col7\" class=\"data row21 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row21_col8\" class=\"data row21 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row22_col1\" class=\"data row22 col1\" >山西汾酒</td>\n",
       "      <td id=\"T_936bc_row22_col2\" class=\"data row22 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row22_col3\" class=\"data row22 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row22_col4\" class=\"data row22 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row22_col5\" class=\"data row22 col5\" >2.00</td>\n",
       "      <td id=\"T_936bc_row22_col6\" class=\"data row22 col6\" >896</td>\n",
       "      <td id=\"T_936bc_row22_col7\" class=\"data row22 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row22_col8\" class=\"data row22 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row23_col1\" class=\"data row23 col1\" >药明生物</td>\n",
       "      <td id=\"T_936bc_row23_col2\" class=\"data row23 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row23_col3\" class=\"data row23 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row23_col4\" class=\"data row23 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row23_col5\" class=\"data row23 col5\" >6.00</td>\n",
       "      <td id=\"T_936bc_row23_col6\" class=\"data row23 col6\" >710</td>\n",
       "      <td id=\"T_936bc_row23_col7\" class=\"data row23 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row23_col8\" class=\"data row23 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row24_col1\" class=\"data row24 col1\" >三峡能源</td>\n",
       "      <td id=\"T_936bc_row24_col2\" class=\"data row24 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row24_col3\" class=\"data row24 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row24_col4\" class=\"data row24 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row24_col5\" class=\"data row24 col5\" >90.78</td>\n",
       "      <td id=\"T_936bc_row24_col6\" class=\"data row24 col6\" >515</td>\n",
       "      <td id=\"T_936bc_row24_col7\" class=\"data row24 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row24_col8\" class=\"data row24 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row25_col1\" class=\"data row25 col1\" >迈瑞医疗</td>\n",
       "      <td id=\"T_936bc_row25_col2\" class=\"data row25 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row25_col3\" class=\"data row25 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row25_col4\" class=\"data row25 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row25_col5\" class=\"data row25 col5\" >1.00</td>\n",
       "      <td id=\"T_936bc_row25_col6\" class=\"data row25 col6\" >480</td>\n",
       "      <td id=\"T_936bc_row25_col7\" class=\"data row25 col7\" >0.01</td>\n",
       "      <td id=\"T_936bc_row25_col8\" class=\"data row25 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row26_col1\" class=\"data row26 col1\" >中望软件</td>\n",
       "      <td id=\"T_936bc_row26_col2\" class=\"data row26 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row26_col3\" class=\"data row26 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row26_col4\" class=\"data row26 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row26_col5\" class=\"data row26 col5\" >0.18</td>\n",
       "      <td id=\"T_936bc_row26_col6\" class=\"data row26 col6\" >96</td>\n",
       "      <td id=\"T_936bc_row26_col7\" class=\"data row26 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row26_col8\" class=\"data row26 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row27_col1\" class=\"data row27 col1\" >百克生物</td>\n",
       "      <td id=\"T_936bc_row27_col2\" class=\"data row27 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row27_col3\" class=\"data row27 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row27_col4\" class=\"data row27 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row27_col5\" class=\"data row27 col5\" >0.35</td>\n",
       "      <td id=\"T_936bc_row27_col6\" class=\"data row27 col6\" >36</td>\n",
       "      <td id=\"T_936bc_row27_col7\" class=\"data row27 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row27_col8\" class=\"data row27 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row28_col1\" class=\"data row28 col1\" >百洋医药</td>\n",
       "      <td id=\"T_936bc_row28_col2\" class=\"data row28 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row28_col3\" class=\"data row28 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row28_col4\" class=\"data row28 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row28_col5\" class=\"data row28 col5\" >0.46</td>\n",
       "      <td id=\"T_936bc_row28_col6\" class=\"data row28 col6\" >25</td>\n",
       "      <td id=\"T_936bc_row28_col7\" class=\"data row28 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row28_col8\" class=\"data row28 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row29_col1\" class=\"data row29 col1\" >力芯微</td>\n",
       "      <td id=\"T_936bc_row29_col2\" class=\"data row29 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row29_col3\" class=\"data row29 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row29_col4\" class=\"data row29 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row29_col5\" class=\"data row29 col5\" >0.12</td>\n",
       "      <td id=\"T_936bc_row29_col6\" class=\"data row29 col6\" >22</td>\n",
       "      <td id=\"T_936bc_row29_col7\" class=\"data row29 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row29_col8\" class=\"data row29 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row30_col1\" class=\"data row30 col1\" >贝泰妮</td>\n",
       "      <td id=\"T_936bc_row30_col2\" class=\"data row30 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row30_col3\" class=\"data row30 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row30_col4\" class=\"data row30 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row30_col5\" class=\"data row30 col5\" >0.09</td>\n",
       "      <td id=\"T_936bc_row30_col6\" class=\"data row30 col6\" >21</td>\n",
       "      <td id=\"T_936bc_row30_col7\" class=\"data row30 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row30_col8\" class=\"data row30 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row31_col1\" class=\"data row31 col1\" >欢乐家</td>\n",
       "      <td id=\"T_936bc_row31_col2\" class=\"data row31 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row31_col3\" class=\"data row31 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row31_col4\" class=\"data row31 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row31_col5\" class=\"data row31 col5\" >0.93</td>\n",
       "      <td id=\"T_936bc_row31_col6\" class=\"data row31 col6\" >17</td>\n",
       "      <td id=\"T_936bc_row31_col7\" class=\"data row31 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row31_col8\" class=\"data row31 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row32_col1\" class=\"data row32 col1\" >东鹏饮料</td>\n",
       "      <td id=\"T_936bc_row32_col2\" class=\"data row32 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row32_col3\" class=\"data row32 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row32_col4\" class=\"data row32 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row32_col5\" class=\"data row32 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row32_col6\" class=\"data row32 col6\" >16</td>\n",
       "      <td id=\"T_936bc_row32_col7\" class=\"data row32 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row32_col8\" class=\"data row32 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row33_col1\" class=\"data row33 col1\" >雷尔伟</td>\n",
       "      <td id=\"T_936bc_row33_col2\" class=\"data row33 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row33_col3\" class=\"data row33 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row33_col4\" class=\"data row33 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row33_col5\" class=\"data row33 col5\" >0.27</td>\n",
       "      <td id=\"T_936bc_row33_col6\" class=\"data row33 col6\" >12</td>\n",
       "      <td id=\"T_936bc_row33_col7\" class=\"data row33 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row33_col8\" class=\"data row33 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row34_col1\" class=\"data row34 col1\" >中伟股份</td>\n",
       "      <td id=\"T_936bc_row34_col2\" class=\"data row34 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row34_col3\" class=\"data row34 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row34_col4\" class=\"data row34 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row34_col5\" class=\"data row34 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row34_col6\" class=\"data row34 col6\" >10</td>\n",
       "      <td id=\"T_936bc_row34_col7\" class=\"data row34 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row34_col8\" class=\"data row34 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row35_col1\" class=\"data row35 col1\" >康众医疗</td>\n",
       "      <td id=\"T_936bc_row35_col2\" class=\"data row35 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row35_col3\" class=\"data row35 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row35_col4\" class=\"data row35 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row35_col5\" class=\"data row35 col5\" >0.19</td>\n",
       "      <td id=\"T_936bc_row35_col6\" class=\"data row35 col6\" >8</td>\n",
       "      <td id=\"T_936bc_row35_col7\" class=\"data row35 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row35_col8\" class=\"data row35 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row36_col1\" class=\"data row36 col1\" >华利集团</td>\n",
       "      <td id=\"T_936bc_row36_col2\" class=\"data row36 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row36_col3\" class=\"data row36 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row36_col4\" class=\"data row36 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row36_col5\" class=\"data row36 col5\" >0.09</td>\n",
       "      <td id=\"T_936bc_row36_col6\" class=\"data row36 col6\" >8</td>\n",
       "      <td id=\"T_936bc_row36_col7\" class=\"data row36 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row36_col8\" class=\"data row36 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row37_col1\" class=\"data row37 col1\" >宁波方正</td>\n",
       "      <td id=\"T_936bc_row37_col2\" class=\"data row37 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row37_col3\" class=\"data row37 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row37_col4\" class=\"data row37 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row37_col5\" class=\"data row37 col5\" >0.20</td>\n",
       "      <td id=\"T_936bc_row37_col6\" class=\"data row37 col6\" >6</td>\n",
       "      <td id=\"T_936bc_row37_col7\" class=\"data row37 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row37_col8\" class=\"data row37 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row38_col1\" class=\"data row38 col1\" >英科再生</td>\n",
       "      <td id=\"T_936bc_row38_col2\" class=\"data row38 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row38_col3\" class=\"data row38 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row38_col4\" class=\"data row38 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row38_col5\" class=\"data row38 col5\" >0.25</td>\n",
       "      <td id=\"T_936bc_row38_col6\" class=\"data row38 col6\" >5</td>\n",
       "      <td id=\"T_936bc_row38_col7\" class=\"data row38 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row38_col8\" class=\"data row38 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row39_col1\" class=\"data row39 col1\" >漱玉平民</td>\n",
       "      <td id=\"T_936bc_row39_col2\" class=\"data row39 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row39_col3\" class=\"data row39 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row39_col4\" class=\"data row39 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row39_col5\" class=\"data row39 col5\" >0.56</td>\n",
       "      <td id=\"T_936bc_row39_col6\" class=\"data row39 col6\" >5</td>\n",
       "      <td id=\"T_936bc_row39_col7\" class=\"data row39 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row39_col8\" class=\"data row39 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row40_col1\" class=\"data row40 col1\" >立高食品</td>\n",
       "      <td id=\"T_936bc_row40_col2\" class=\"data row40 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row40_col3\" class=\"data row40 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row40_col4\" class=\"data row40 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row40_col5\" class=\"data row40 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row40_col6\" class=\"data row40 col6\" >4</td>\n",
       "      <td id=\"T_936bc_row40_col7\" class=\"data row40 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row40_col8\" class=\"data row40 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row41_col1\" class=\"data row41 col1\" >南侨食品</td>\n",
       "      <td id=\"T_936bc_row41_col2\" class=\"data row41 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row41_col3\" class=\"data row41 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row41_col4\" class=\"data row41 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row41_col5\" class=\"data row41 col5\" >0.09</td>\n",
       "      <td id=\"T_936bc_row41_col6\" class=\"data row41 col6\" >4</td>\n",
       "      <td id=\"T_936bc_row41_col7\" class=\"data row41 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row41_col8\" class=\"data row41 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row42_col1\" class=\"data row42 col1\" >工大高科</td>\n",
       "      <td id=\"T_936bc_row42_col2\" class=\"data row42 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row42_col3\" class=\"data row42 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row42_col4\" class=\"data row42 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row42_col5\" class=\"data row42 col5\" >0.17</td>\n",
       "      <td id=\"T_936bc_row42_col6\" class=\"data row42 col6\" >4</td>\n",
       "      <td id=\"T_936bc_row42_col7\" class=\"data row42 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row42_col8\" class=\"data row42 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row43_col1\" class=\"data row43 col1\" >瑞丰银行</td>\n",
       "      <td id=\"T_936bc_row43_col2\" class=\"data row43 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row43_col3\" class=\"data row43 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row43_col4\" class=\"data row43 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row43_col5\" class=\"data row43 col5\" >0.22</td>\n",
       "      <td id=\"T_936bc_row43_col6\" class=\"data row43 col6\" >3</td>\n",
       "      <td id=\"T_936bc_row43_col7\" class=\"data row43 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row43_col8\" class=\"data row43 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row44_col1\" class=\"data row44 col1\" >英诺激光</td>\n",
       "      <td id=\"T_936bc_row44_col2\" class=\"data row44 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row44_col3\" class=\"data row44 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row44_col4\" class=\"data row44 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row44_col5\" class=\"data row44 col5\" >0.29</td>\n",
       "      <td id=\"T_936bc_row44_col6\" class=\"data row44 col6\" >3</td>\n",
       "      <td id=\"T_936bc_row44_col7\" class=\"data row44 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row44_col8\" class=\"data row44 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row45_col1\" class=\"data row45 col1\" >震裕科技</td>\n",
       "      <td id=\"T_936bc_row45_col2\" class=\"data row45 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row45_col3\" class=\"data row45 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row45_col4\" class=\"data row45 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row45_col5\" class=\"data row45 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row45_col6\" class=\"data row45 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row45_col7\" class=\"data row45 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row45_col8\" class=\"data row45 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row46_col1\" class=\"data row46 col1\" >联科科技</td>\n",
       "      <td id=\"T_936bc_row46_col2\" class=\"data row46 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row46_col3\" class=\"data row46 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row46_col4\" class=\"data row46 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row46_col5\" class=\"data row46 col5\" >0.07</td>\n",
       "      <td id=\"T_936bc_row46_col6\" class=\"data row46 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row46_col7\" class=\"data row46 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row46_col8\" class=\"data row46 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row47_col1\" class=\"data row47 col1\" >可靠股份</td>\n",
       "      <td id=\"T_936bc_row47_col2\" class=\"data row47 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row47_col3\" class=\"data row47 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row47_col4\" class=\"data row47 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row47_col5\" class=\"data row47 col5\" >0.08</td>\n",
       "      <td id=\"T_936bc_row47_col6\" class=\"data row47 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row47_col7\" class=\"data row47 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row47_col8\" class=\"data row47 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row48_col1\" class=\"data row48 col1\" >亿田智能</td>\n",
       "      <td id=\"T_936bc_row48_col2\" class=\"data row48 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row48_col3\" class=\"data row48 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row48_col4\" class=\"data row48 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row48_col5\" class=\"data row48 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row48_col6\" class=\"data row48 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row48_col7\" class=\"data row48 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row48_col8\" class=\"data row48 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row49_col1\" class=\"data row49 col1\" >威腾电气</td>\n",
       "      <td id=\"T_936bc_row49_col2\" class=\"data row49 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row49_col3\" class=\"data row49 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row49_col4\" class=\"data row49 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row49_col5\" class=\"data row49 col5\" >0.27</td>\n",
       "      <td id=\"T_936bc_row49_col6\" class=\"data row49 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row49_col7\" class=\"data row49 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row49_col8\" class=\"data row49 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row50_col1\" class=\"data row50 col1\" >海程邦达</td>\n",
       "      <td id=\"T_936bc_row50_col2\" class=\"data row50 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row50_col3\" class=\"data row50 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row50_col4\" class=\"data row50 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row50_col5\" class=\"data row50 col5\" >0.07</td>\n",
       "      <td id=\"T_936bc_row50_col6\" class=\"data row50 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row50_col7\" class=\"data row50 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row50_col8\" class=\"data row50 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row51_col1\" class=\"data row51 col1\" >法本信息</td>\n",
       "      <td id=\"T_936bc_row51_col2\" class=\"data row51 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row51_col3\" class=\"data row51 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row51_col4\" class=\"data row51 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row51_col5\" class=\"data row51 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row51_col6\" class=\"data row51 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row51_col7\" class=\"data row51 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row51_col8\" class=\"data row51 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row52_col1\" class=\"data row52 col1\" >三友联众</td>\n",
       "      <td id=\"T_936bc_row52_col2\" class=\"data row52 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row52_col3\" class=\"data row52 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row52_col4\" class=\"data row52 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row52_col5\" class=\"data row52 col5\" >0.05</td>\n",
       "      <td id=\"T_936bc_row52_col6\" class=\"data row52 col6\" >2</td>\n",
       "      <td id=\"T_936bc_row52_col7\" class=\"data row52 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row52_col8\" class=\"data row52 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row53_col1\" class=\"data row53 col1\" >苏文电能</td>\n",
       "      <td id=\"T_936bc_row53_col2\" class=\"data row53 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row53_col3\" class=\"data row53 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row53_col4\" class=\"data row53 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row53_col5\" class=\"data row53 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row53_col6\" class=\"data row53 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row53_col7\" class=\"data row53 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row53_col8\" class=\"data row53 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row54_col1\" class=\"data row54 col1\" >格林精密</td>\n",
       "      <td id=\"T_936bc_row54_col2\" class=\"data row54 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row54_col3\" class=\"data row54 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row54_col4\" class=\"data row54 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row54_col5\" class=\"data row54 col5\" >0.12</td>\n",
       "      <td id=\"T_936bc_row54_col6\" class=\"data row54 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row54_col7\" class=\"data row54 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row54_col8\" class=\"data row54 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row55_col1\" class=\"data row55 col1\" >华菱线缆</td>\n",
       "      <td id=\"T_936bc_row55_col2\" class=\"data row55 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row55_col3\" class=\"data row55 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row55_col4\" class=\"data row55 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row55_col5\" class=\"data row55 col5\" >0.18</td>\n",
       "      <td id=\"T_936bc_row55_col6\" class=\"data row55 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row55_col7\" class=\"data row55 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row55_col8\" class=\"data row55 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row56_col1\" class=\"data row56 col1\" >南极光</td>\n",
       "      <td id=\"T_936bc_row56_col2\" class=\"data row56 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row56_col3\" class=\"data row56 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row56_col4\" class=\"data row56 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row56_col5\" class=\"data row56 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row56_col6\" class=\"data row56 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row56_col7\" class=\"data row56 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row56_col8\" class=\"data row56 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row57_col1\" class=\"data row57 col1\" >百川畅银</td>\n",
       "      <td id=\"T_936bc_row57_col2\" class=\"data row57 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row57_col3\" class=\"data row57 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row57_col4\" class=\"data row57 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row57_col5\" class=\"data row57 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row57_col6\" class=\"data row57 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row57_col7\" class=\"data row57 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row57_col8\" class=\"data row57 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row58_col1\" class=\"data row58 col1\" >易瑞生物</td>\n",
       "      <td id=\"T_936bc_row58_col2\" class=\"data row58 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row58_col3\" class=\"data row58 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row58_col4\" class=\"data row58 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row58_col5\" class=\"data row58 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row58_col6\" class=\"data row58 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row58_col7\" class=\"data row58 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row58_col8\" class=\"data row58 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row59_col1\" class=\"data row59 col1\" >税友股份</td>\n",
       "      <td id=\"T_936bc_row59_col2\" class=\"data row59 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row59_col3\" class=\"data row59 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row59_col4\" class=\"data row59 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row59_col5\" class=\"data row59 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row59_col6\" class=\"data row59 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row59_col7\" class=\"data row59 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row59_col8\" class=\"data row59 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row60_col1\" class=\"data row60 col1\" >崧盛股份</td>\n",
       "      <td id=\"T_936bc_row60_col2\" class=\"data row60 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row60_col3\" class=\"data row60 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row60_col4\" class=\"data row60 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row60_col5\" class=\"data row60 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row60_col6\" class=\"data row60 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row60_col7\" class=\"data row60 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row60_col8\" class=\"data row60 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row61_col1\" class=\"data row61 col1\" >中辰股份</td>\n",
       "      <td id=\"T_936bc_row61_col2\" class=\"data row61 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row61_col3\" class=\"data row61 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row61_col4\" class=\"data row61 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row61_col5\" class=\"data row61 col5\" >0.11</td>\n",
       "      <td id=\"T_936bc_row61_col6\" class=\"data row61 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row61_col7\" class=\"data row61 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row61_col8\" class=\"data row61 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row62_col1\" class=\"data row62 col1\" >南山智尚</td>\n",
       "      <td id=\"T_936bc_row62_col2\" class=\"data row62 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row62_col3\" class=\"data row62 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row62_col4\" class=\"data row62 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row62_col5\" class=\"data row62 col5\" >0.11</td>\n",
       "      <td id=\"T_936bc_row62_col6\" class=\"data row62 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row62_col7\" class=\"data row62 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row62_col8\" class=\"data row62 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row63_col1\" class=\"data row63 col1\" >德才股份</td>\n",
       "      <td id=\"T_936bc_row63_col2\" class=\"data row63 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row63_col3\" class=\"data row63 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row63_col4\" class=\"data row63 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row63_col5\" class=\"data row63 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row63_col6\" class=\"data row63 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row63_col7\" class=\"data row63 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row63_col8\" class=\"data row63 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row64_col1\" class=\"data row64 col1\" >嘉亨家化</td>\n",
       "      <td id=\"T_936bc_row64_col2\" class=\"data row64 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row64_col3\" class=\"data row64 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row64_col4\" class=\"data row64 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row64_col5\" class=\"data row64 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row64_col6\" class=\"data row64 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row64_col7\" class=\"data row64 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row64_col8\" class=\"data row64 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row65_col1\" class=\"data row65 col1\" >英力股份</td>\n",
       "      <td id=\"T_936bc_row65_col2\" class=\"data row65 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row65_col3\" class=\"data row65 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row65_col4\" class=\"data row65 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row65_col5\" class=\"data row65 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row65_col6\" class=\"data row65 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row65_col7\" class=\"data row65 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row65_col8\" class=\"data row65 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row66_col1\" class=\"data row66 col1\" >中金辐照</td>\n",
       "      <td id=\"T_936bc_row66_col2\" class=\"data row66 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row66_col3\" class=\"data row66 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row66_col4\" class=\"data row66 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row66_col5\" class=\"data row66 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row66_col6\" class=\"data row66 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row66_col7\" class=\"data row66 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row66_col8\" class=\"data row66 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row67_col1\" class=\"data row67 col1\" >恒辉安防</td>\n",
       "      <td id=\"T_936bc_row67_col2\" class=\"data row67 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row67_col3\" class=\"data row67 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row67_col4\" class=\"data row67 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row67_col5\" class=\"data row67 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row67_col6\" class=\"data row67 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row67_col7\" class=\"data row67 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row67_col8\" class=\"data row67 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row68_col1\" class=\"data row68 col1\" >共同药业</td>\n",
       "      <td id=\"T_936bc_row68_col2\" class=\"data row68 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row68_col3\" class=\"data row68 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row68_col4\" class=\"data row68 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row68_col5\" class=\"data row68 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row68_col6\" class=\"data row68 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row68_col7\" class=\"data row68 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row68_col8\" class=\"data row68 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row69_col1\" class=\"data row69 col1\" >曼卡龙</td>\n",
       "      <td id=\"T_936bc_row69_col2\" class=\"data row69 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row69_col3\" class=\"data row69 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row69_col4\" class=\"data row69 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row69_col5\" class=\"data row69 col5\" >0.05</td>\n",
       "      <td id=\"T_936bc_row69_col6\" class=\"data row69 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row69_col7\" class=\"data row69 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row69_col8\" class=\"data row69 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row70_col1\" class=\"data row70 col1\" >冠中生态</td>\n",
       "      <td id=\"T_936bc_row70_col2\" class=\"data row70 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row70_col3\" class=\"data row70 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row70_col4\" class=\"data row70 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row70_col5\" class=\"data row70 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row70_col6\" class=\"data row70 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row70_col7\" class=\"data row70 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row70_col8\" class=\"data row70 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row71_col1\" class=\"data row71 col1\" >通用电梯</td>\n",
       "      <td id=\"T_936bc_row71_col2\" class=\"data row71 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row71_col3\" class=\"data row71 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row71_col4\" class=\"data row71 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row71_col5\" class=\"data row71 col5\" >0.07</td>\n",
       "      <td id=\"T_936bc_row71_col6\" class=\"data row71 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row71_col7\" class=\"data row71 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row71_col8\" class=\"data row71 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row72_col1\" class=\"data row72 col1\" >深水海纳</td>\n",
       "      <td id=\"T_936bc_row72_col2\" class=\"data row72 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row72_col3\" class=\"data row72 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row72_col4\" class=\"data row72 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row72_col5\" class=\"data row72 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row72_col6\" class=\"data row72 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row72_col7\" class=\"data row72 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row72_col8\" class=\"data row72 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row73_col1\" class=\"data row73 col1\" >德固特</td>\n",
       "      <td id=\"T_936bc_row73_col2\" class=\"data row73 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row73_col3\" class=\"data row73 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row73_col4\" class=\"data row73 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row73_col5\" class=\"data row73 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row73_col6\" class=\"data row73 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row73_col7\" class=\"data row73 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row73_col8\" class=\"data row73 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row74_col1\" class=\"data row74 col1\" >东箭科技</td>\n",
       "      <td id=\"T_936bc_row74_col2\" class=\"data row74 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row74_col3\" class=\"data row74 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row74_col4\" class=\"data row74 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row74_col5\" class=\"data row74 col5\" >0.06</td>\n",
       "      <td id=\"T_936bc_row74_col6\" class=\"data row74 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row74_col7\" class=\"data row74 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row74_col8\" class=\"data row74 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row75_col1\" class=\"data row75 col1\" >志特新材</td>\n",
       "      <td id=\"T_936bc_row75_col2\" class=\"data row75 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row75_col3\" class=\"data row75 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row75_col4\" class=\"data row75 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row75_col5\" class=\"data row75 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row75_col6\" class=\"data row75 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row75_col7\" class=\"data row75 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row75_col8\" class=\"data row75 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row76_col1\" class=\"data row76 col1\" >博俊科技</td>\n",
       "      <td id=\"T_936bc_row76_col2\" class=\"data row76 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row76_col3\" class=\"data row76 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row76_col4\" class=\"data row76 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row76_col5\" class=\"data row76 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row76_col6\" class=\"data row76 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row76_col7\" class=\"data row76 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row76_col8\" class=\"data row76 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row77_col1\" class=\"data row77 col1\" >屹通新材</td>\n",
       "      <td id=\"T_936bc_row77_col2\" class=\"data row77 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row77_col3\" class=\"data row77 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row77_col4\" class=\"data row77 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row77_col5\" class=\"data row77 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row77_col6\" class=\"data row77 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row77_col7\" class=\"data row77 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row77_col8\" class=\"data row77 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row78_col1\" class=\"data row78 col1\" >致远新能</td>\n",
       "      <td id=\"T_936bc_row78_col2\" class=\"data row78 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row78_col3\" class=\"data row78 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row78_col4\" class=\"data row78 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row78_col5\" class=\"data row78 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row78_col6\" class=\"data row78 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row78_col7\" class=\"data row78 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row78_col8\" class=\"data row78 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row79_col1\" class=\"data row79 col1\" >创益通</td>\n",
       "      <td id=\"T_936bc_row79_col2\" class=\"data row79 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row79_col3\" class=\"data row79 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row79_col4\" class=\"data row79 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row79_col5\" class=\"data row79 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row79_col6\" class=\"data row79 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row79_col7\" class=\"data row79 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row79_col8\" class=\"data row79 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row80_col1\" class=\"data row80 col1\" >江天化学</td>\n",
       "      <td id=\"T_936bc_row80_col2\" class=\"data row80 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row80_col3\" class=\"data row80 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row80_col4\" class=\"data row80 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row80_col5\" class=\"data row80 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row80_col6\" class=\"data row80 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row80_col7\" class=\"data row80 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row80_col8\" class=\"data row80 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row81_col1\" class=\"data row81 col1\" >商络电子</td>\n",
       "      <td id=\"T_936bc_row81_col2\" class=\"data row81 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row81_col3\" class=\"data row81 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row81_col4\" class=\"data row81 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row81_col5\" class=\"data row81 col5\" >0.05</td>\n",
       "      <td id=\"T_936bc_row81_col6\" class=\"data row81 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row81_col7\" class=\"data row81 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row81_col8\" class=\"data row81 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row82_col1\" class=\"data row82 col1\" >中洲特材</td>\n",
       "      <td id=\"T_936bc_row82_col2\" class=\"data row82 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row82_col3\" class=\"data row82 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row82_col4\" class=\"data row82 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row82_col5\" class=\"data row82 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row82_col6\" class=\"data row82 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row82_col7\" class=\"data row82 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row82_col8\" class=\"data row82 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row83_col1\" class=\"data row83 col1\" >春晖智控</td>\n",
       "      <td id=\"T_936bc_row83_col2\" class=\"data row83 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row83_col3\" class=\"data row83 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row83_col4\" class=\"data row83 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row83_col5\" class=\"data row83 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row83_col6\" class=\"data row83 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row83_col7\" class=\"data row83 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row83_col8\" class=\"data row83 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row84_col1\" class=\"data row84 col1\" >华骐环保</td>\n",
       "      <td id=\"T_936bc_row84_col2\" class=\"data row84 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row84_col3\" class=\"data row84 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row84_col4\" class=\"data row84 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row84_col5\" class=\"data row84 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row84_col6\" class=\"data row84 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row84_col7\" class=\"data row84 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row84_col8\" class=\"data row84 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row85_col1\" class=\"data row85 col1\" >通业科技</td>\n",
       "      <td id=\"T_936bc_row85_col2\" class=\"data row85 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row85_col3\" class=\"data row85 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row85_col4\" class=\"data row85 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row85_col5\" class=\"data row85 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row85_col6\" class=\"data row85 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row85_col7\" class=\"data row85 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row85_col8\" class=\"data row85 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row86_col1\" class=\"data row86 col1\" >万辰生物</td>\n",
       "      <td id=\"T_936bc_row86_col2\" class=\"data row86 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row86_col3\" class=\"data row86 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row86_col4\" class=\"data row86 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row86_col5\" class=\"data row86 col5\" >0.04</td>\n",
       "      <td id=\"T_936bc_row86_col6\" class=\"data row86 col6\" >1</td>\n",
       "      <td id=\"T_936bc_row86_col7\" class=\"data row86 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row86_col8\" class=\"data row86 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row87_col1\" class=\"data row87 col1\" >杭州热电</td>\n",
       "      <td id=\"T_936bc_row87_col2\" class=\"data row87 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row87_col3\" class=\"data row87 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row87_col4\" class=\"data row87 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row87_col5\" class=\"data row87 col5\" >0.05</td>\n",
       "      <td id=\"T_936bc_row87_col6\" class=\"data row87 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row87_col7\" class=\"data row87 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row87_col8\" class=\"data row87 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row88_col1\" class=\"data row88 col1\" >奇德新材</td>\n",
       "      <td id=\"T_936bc_row88_col2\" class=\"data row88 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row88_col3\" class=\"data row88 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row88_col4\" class=\"data row88 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row88_col5\" class=\"data row88 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row88_col6\" class=\"data row88 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row88_col7\" class=\"data row88 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row88_col8\" class=\"data row88 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row89_col1\" class=\"data row89 col1\" >德迈仕</td>\n",
       "      <td id=\"T_936bc_row89_col2\" class=\"data row89 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row89_col3\" class=\"data row89 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row89_col4\" class=\"data row89 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row89_col5\" class=\"data row89 col5\" >0.03</td>\n",
       "      <td id=\"T_936bc_row89_col6\" class=\"data row89 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row89_col7\" class=\"data row89 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row89_col8\" class=\"data row89 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row90_col1\" class=\"data row90 col1\" >泰福泵业</td>\n",
       "      <td id=\"T_936bc_row90_col2\" class=\"data row90 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row90_col3\" class=\"data row90 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row90_col4\" class=\"data row90 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row90_col5\" class=\"data row90 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row90_col6\" class=\"data row90 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row90_col7\" class=\"data row90 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row90_col8\" class=\"data row90 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row91_col1\" class=\"data row91 col1\" >扬电科技</td>\n",
       "      <td id=\"T_936bc_row91_col2\" class=\"data row91 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row91_col3\" class=\"data row91 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row91_col4\" class=\"data row91 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row91_col5\" class=\"data row91 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row91_col6\" class=\"data row91 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row91_col7\" class=\"data row91 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row91_col8\" class=\"data row91 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row92_col1\" class=\"data row92 col1\" >晶雪节能</td>\n",
       "      <td id=\"T_936bc_row92_col2\" class=\"data row92 col2\" >nan</td>\n",
       "      <td id=\"T_936bc_row92_col3\" class=\"data row92 col3\" >nan</td>\n",
       "      <td id=\"T_936bc_row92_col4\" class=\"data row92 col4\" >nan</td>\n",
       "      <td id=\"T_936bc_row92_col5\" class=\"data row92 col5\" >0.02</td>\n",
       "      <td id=\"T_936bc_row92_col6\" class=\"data row92 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row92_col7\" class=\"data row92 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row92_col8\" class=\"data row92 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row93_col1\" class=\"data row93 col1\" >美年健康</td>\n",
       "      <td id=\"T_936bc_row93_col2\" class=\"data row93 col2\" >10660.01</td>\n",
       "      <td id=\"T_936bc_row93_col3\" class=\"data row93 col3\" >164377</td>\n",
       "      <td id=\"T_936bc_row93_col4\" class=\"data row93 col4\" >1.87</td>\n",
       "      <td id=\"T_936bc_row93_col5\" class=\"data row93 col5\" >0.00</td>\n",
       "      <td id=\"T_936bc_row93_col6\" class=\"data row93 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row93_col7\" class=\"data row93 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row93_col8\" class=\"data row93 col8\" >-10660.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row94_col1\" class=\"data row94 col1\" >华兰生物</td>\n",
       "      <td id=\"T_936bc_row94_col2\" class=\"data row94 col2\" >6200.01</td>\n",
       "      <td id=\"T_936bc_row94_col3\" class=\"data row94 col3\" >246450</td>\n",
       "      <td id=\"T_936bc_row94_col4\" class=\"data row94 col4\" >2.80</td>\n",
       "      <td id=\"T_936bc_row94_col5\" class=\"data row94 col5\" >0.00</td>\n",
       "      <td id=\"T_936bc_row94_col6\" class=\"data row94 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row94_col7\" class=\"data row94 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row94_col8\" class=\"data row94 col8\" >-6200.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_936bc_row95_col1\" class=\"data row95 col1\" >中炬高新</td>\n",
       "      <td id=\"T_936bc_row95_col2\" class=\"data row95 col2\" >3100.01</td>\n",
       "      <td id=\"T_936bc_row95_col3\" class=\"data row95 col3\" >150134</td>\n",
       "      <td id=\"T_936bc_row95_col4\" class=\"data row95 col4\" >1.71</td>\n",
       "      <td id=\"T_936bc_row95_col5\" class=\"data row95 col5\" >0.00</td>\n",
       "      <td id=\"T_936bc_row95_col6\" class=\"data row95 col6\" >0</td>\n",
       "      <td id=\"T_936bc_row95_col7\" class=\"data row95 col7\" >0.00</td>\n",
       "      <td id=\"T_936bc_row95_col8\" class=\"data row95 col8\" >-3100.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x7fb73b7ce7c0>"
      ]
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "metadata": {
    "scrolled": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "source": [
    "df_merge_update = df_merge[~(df_merge['持股数变化'].isna())]\n",
    "df_merge_update.style.hide_index()\\\n",
    "                .hide_columns(['股票代码'])\\\n",
    "                .format(format_dict)\\\n",
    "                .bar(subset=['持股数变化'],color=['#99ff66','#ee7621'],align='mid')"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_f5954_row0_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 86.4%, transparent 86.4%);\n",
       "}\n",
       "#T_f5954_row1_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 83.7%, #99ff66 83.7%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row2_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 87.9%, transparent 87.9%);\n",
       "}\n",
       "#T_f5954_row3_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #99ff66 86.2%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row4_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 92.1%, transparent 92.1%);\n",
       "}\n",
       "#T_f5954_row5_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 86.2%, #ee7621 86.2%, #ee7621 100.0%, transparent 100.0%);\n",
       "}\n",
       "#T_f5954_row6_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 81.6%, #99ff66 81.6%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row7_col8, #T_f5954_row8_col8, #T_f5954_row9_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "}\n",
       "#T_f5954_row10_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 55.5%, #99ff66 55.5%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row11_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 76.6%, #99ff66 76.6%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row12_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg,#99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row13_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 36.1%, #99ff66 36.1%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "#T_f5954_row14_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 61.2%, #99ff66 61.2%, #99ff66 86.2%, transparent 86.2%);\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_f5954_\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"col_heading level0 col1\" >股票名称</th>\n",
       "      <th class=\"col_heading level0 col2\" >2021Q1持股数</th>\n",
       "      <th class=\"col_heading level0 col3\" >2021Q1持仓市值</th>\n",
       "      <th class=\"col_heading level0 col4\" >2021Q1持仓比例</th>\n",
       "      <th class=\"col_heading level0 col5\" >2021Q2持股数</th>\n",
       "      <th class=\"col_heading level0 col6\" >2021Q2持仓市值</th>\n",
       "      <th class=\"col_heading level0 col7\" >2021Q2持仓比例</th>\n",
       "      <th class=\"col_heading level0 col8\" >持股数变化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row0_col1\" class=\"data row0 col1\" >香港交易所</td>\n",
       "      <td id=\"T_f5954_row0_col2\" class=\"data row0 col2\" >2286.00</td>\n",
       "      <td id=\"T_f5954_row0_col3\" class=\"data row0 col3\" >883734</td>\n",
       "      <td id=\"T_f5954_row0_col4\" class=\"data row0 col4\" >10.04</td>\n",
       "      <td id=\"T_f5954_row0_col5\" class=\"data row0 col5\" >2310.00</td>\n",
       "      <td id=\"T_f5954_row0_col6\" class=\"data row0 col6\" >889550</td>\n",
       "      <td id=\"T_f5954_row0_col7\" class=\"data row0 col7\" >9.90</td>\n",
       "      <td id=\"T_f5954_row0_col8\" class=\"data row0 col8\" >24.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row1_col1\" class=\"data row1 col1\" >五粮液</td>\n",
       "      <td id=\"T_f5954_row1_col2\" class=\"data row1 col2\" >3300.00</td>\n",
       "      <td id=\"T_f5954_row1_col3\" class=\"data row1 col3\" >884334</td>\n",
       "      <td id=\"T_f5954_row1_col4\" class=\"data row1 col4\" >10.05</td>\n",
       "      <td id=\"T_f5954_row1_col5\" class=\"data row1 col5\" >2980.00</td>\n",
       "      <td id=\"T_f5954_row1_col6\" class=\"data row1 col6\" >887712</td>\n",
       "      <td id=\"T_f5954_row1_col7\" class=\"data row1 col7\" >9.88</td>\n",
       "      <td id=\"T_f5954_row1_col8\" class=\"data row1 col8\" >-320.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row2_col1\" class=\"data row2 col1\" >腾讯控股</td>\n",
       "      <td id=\"T_f5954_row2_col2\" class=\"data row2 col2\" >1610.00</td>\n",
       "      <td id=\"T_f5954_row2_col3\" class=\"data row2 col3\" >830051</td>\n",
       "      <td id=\"T_f5954_row2_col4\" class=\"data row2 col4\" >9.43</td>\n",
       "      <td id=\"T_f5954_row2_col5\" class=\"data row2 col5\" >1810.00</td>\n",
       "      <td id=\"T_f5954_row2_col6\" class=\"data row2 col6\" >879542</td>\n",
       "      <td id=\"T_f5954_row2_col7\" class=\"data row2 col7\" >9.78</td>\n",
       "      <td id=\"T_f5954_row2_col8\" class=\"data row2 col8\" >200.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row3_col1\" class=\"data row3 col1\" >贵州茅台</td>\n",
       "      <td id=\"T_f5954_row3_col2\" class=\"data row3 col2\" >432.00</td>\n",
       "      <td id=\"T_f5954_row3_col3\" class=\"data row3 col3\" >867888</td>\n",
       "      <td id=\"T_f5954_row3_col4\" class=\"data row3 col4\" >9.86</td>\n",
       "      <td id=\"T_f5954_row3_col5\" class=\"data row3 col5\" >426.00</td>\n",
       "      <td id=\"T_f5954_row3_col6\" class=\"data row3 col6\" >876154</td>\n",
       "      <td id=\"T_f5954_row3_col7\" class=\"data row3 col7\" >9.75</td>\n",
       "      <td id=\"T_f5954_row3_col8\" class=\"data row3 col8\" >-6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row4_col1\" class=\"data row4 col1\" >泸州老窖</td>\n",
       "      <td id=\"T_f5954_row4_col2\" class=\"data row4 col2\" >2980.00</td>\n",
       "      <td id=\"T_f5954_row4_col3\" class=\"data row4 col3\" >670561</td>\n",
       "      <td id=\"T_f5954_row4_col4\" class=\"data row4 col4\" >7.62</td>\n",
       "      <td id=\"T_f5954_row4_col5\" class=\"data row4 col5\" >3700.01</td>\n",
       "      <td id=\"T_f5954_row4_col6\" class=\"data row4 col6\" >872981</td>\n",
       "      <td id=\"T_f5954_row4_col7\" class=\"data row4 col7\" >9.71</td>\n",
       "      <td id=\"T_f5954_row4_col8\" class=\"data row4 col8\" >720.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row5_col1\" class=\"data row5 col1\" >洋河股份</td>\n",
       "      <td id=\"T_f5954_row5_col2\" class=\"data row5 col2\" >2500.02</td>\n",
       "      <td id=\"T_f5954_row5_col3\" class=\"data row5 col3\" >411753</td>\n",
       "      <td id=\"T_f5954_row5_col4\" class=\"data row5 col4\" >4.68</td>\n",
       "      <td id=\"T_f5954_row5_col5\" class=\"data row5 col5\" >4200.01</td>\n",
       "      <td id=\"T_f5954_row5_col6\" class=\"data row5 col6\" >870241</td>\n",
       "      <td id=\"T_f5954_row5_col7\" class=\"data row5 col7\" >9.68</td>\n",
       "      <td id=\"T_f5954_row5_col8\" class=\"data row5 col8\" >1699.99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row6_col1\" class=\"data row6 col1\" >美团-W</td>\n",
       "      <td id=\"T_f5954_row6_col2\" class=\"data row6 col2\" >3370.43</td>\n",
       "      <td id=\"T_f5954_row6_col3\" class=\"data row6 col3\" >849458</td>\n",
       "      <td id=\"T_f5954_row6_col4\" class=\"data row6 col4\" >9.65</td>\n",
       "      <td id=\"T_f5954_row6_col5\" class=\"data row6 col5\" >2800.00</td>\n",
       "      <td id=\"T_f5954_row6_col6\" class=\"data row6 col6\" >746476</td>\n",
       "      <td id=\"T_f5954_row6_col7\" class=\"data row6 col7\" >8.30</td>\n",
       "      <td id=\"T_f5954_row6_col8\" class=\"data row6 col8\" >-570.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row7_col1\" class=\"data row7 col1\" >招商银行</td>\n",
       "      <td id=\"T_f5954_row7_col2\" class=\"data row7 col2\" >11300.00</td>\n",
       "      <td id=\"T_f5954_row7_col3\" class=\"data row7 col3\" >577430</td>\n",
       "      <td id=\"T_f5954_row7_col4\" class=\"data row7 col4\" >6.56</td>\n",
       "      <td id=\"T_f5954_row7_col5\" class=\"data row7 col5\" >11300.00</td>\n",
       "      <td id=\"T_f5954_row7_col6\" class=\"data row7 col6\" >612347</td>\n",
       "      <td id=\"T_f5954_row7_col7\" class=\"data row7 col7\" >6.81</td>\n",
       "      <td id=\"T_f5954_row7_col8\" class=\"data row7 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row8_col1\" class=\"data row8 col1\" >海康威视</td>\n",
       "      <td id=\"T_f5954_row8_col2\" class=\"data row8 col2\" >9000.02</td>\n",
       "      <td id=\"T_f5954_row8_col3\" class=\"data row8 col3\" >503101</td>\n",
       "      <td id=\"T_f5954_row8_col4\" class=\"data row8 col4\" >5.72</td>\n",
       "      <td id=\"T_f5954_row8_col5\" class=\"data row8 col5\" >9000.02</td>\n",
       "      <td id=\"T_f5954_row8_col6\" class=\"data row8 col6\" >580501</td>\n",
       "      <td id=\"T_f5954_row8_col7\" class=\"data row8 col7\" >6.46</td>\n",
       "      <td id=\"T_f5954_row8_col8\" class=\"data row8 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row9_col1\" class=\"data row9 col1\" >招商银行</td>\n",
       "      <td id=\"T_f5954_row9_col2\" class=\"data row9 col2\" >5000.00</td>\n",
       "      <td id=\"T_f5954_row9_col3\" class=\"data row9 col3\" >250807</td>\n",
       "      <td id=\"T_f5954_row9_col4\" class=\"data row9 col4\" >2.85</td>\n",
       "      <td id=\"T_f5954_row9_col5\" class=\"data row9 col5\" >5000.00</td>\n",
       "      <td id=\"T_f5954_row9_col6\" class=\"data row9 col6\" >275626</td>\n",
       "      <td id=\"T_f5954_row9_col7\" class=\"data row9 col7\" >3.07</td>\n",
       "      <td id=\"T_f5954_row9_col8\" class=\"data row9 col8\" >0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row10_col1\" class=\"data row10 col1\" >平安银行</td>\n",
       "      <td id=\"T_f5954_row10_col2\" class=\"data row10 col2\" >13000.00</td>\n",
       "      <td id=\"T_f5954_row10_col3\" class=\"data row10 col3\" >286130</td>\n",
       "      <td id=\"T_f5954_row10_col4\" class=\"data row10 col4\" >3.25</td>\n",
       "      <td id=\"T_f5954_row10_col5\" class=\"data row10 col5\" >9200.00</td>\n",
       "      <td id=\"T_f5954_row10_col6\" class=\"data row10 col6\" >208104</td>\n",
       "      <td id=\"T_f5954_row10_col7\" class=\"data row10 col7\" >2.32</td>\n",
       "      <td id=\"T_f5954_row10_col8\" class=\"data row10 col8\" >-3800.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row11_col1\" class=\"data row11 col1\" >天坛生物</td>\n",
       "      <td id=\"T_f5954_row11_col2\" class=\"data row11 col2\" >1600.01</td>\n",
       "      <td id=\"T_f5954_row11_col3\" class=\"data row11 col3\" >52256</td>\n",
       "      <td id=\"T_f5954_row11_col4\" class=\"data row11 col4\" >0.59</td>\n",
       "      <td id=\"T_f5954_row11_col5\" class=\"data row11 col5\" >410.00</td>\n",
       "      <td id=\"T_f5954_row11_col6\" class=\"data row11 col6\" >13478</td>\n",
       "      <td id=\"T_f5954_row11_col7\" class=\"data row11 col7\" >0.15</td>\n",
       "      <td id=\"T_f5954_row11_col8\" class=\"data row11 col8\" >-1190.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row12_col1\" class=\"data row12 col1\" >美年健康</td>\n",
       "      <td id=\"T_f5954_row12_col2\" class=\"data row12 col2\" >10660.01</td>\n",
       "      <td id=\"T_f5954_row12_col3\" class=\"data row12 col3\" >164377</td>\n",
       "      <td id=\"T_f5954_row12_col4\" class=\"data row12 col4\" >1.87</td>\n",
       "      <td id=\"T_f5954_row12_col5\" class=\"data row12 col5\" >0.00</td>\n",
       "      <td id=\"T_f5954_row12_col6\" class=\"data row12 col6\" >0</td>\n",
       "      <td id=\"T_f5954_row12_col7\" class=\"data row12 col7\" >0.00</td>\n",
       "      <td id=\"T_f5954_row12_col8\" class=\"data row12 col8\" >-10660.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row13_col1\" class=\"data row13 col1\" >华兰生物</td>\n",
       "      <td id=\"T_f5954_row13_col2\" class=\"data row13 col2\" >6200.01</td>\n",
       "      <td id=\"T_f5954_row13_col3\" class=\"data row13 col3\" >246450</td>\n",
       "      <td id=\"T_f5954_row13_col4\" class=\"data row13 col4\" >2.80</td>\n",
       "      <td id=\"T_f5954_row13_col5\" class=\"data row13 col5\" >0.00</td>\n",
       "      <td id=\"T_f5954_row13_col6\" class=\"data row13 col6\" >0</td>\n",
       "      <td id=\"T_f5954_row13_col7\" class=\"data row13 col7\" >0.00</td>\n",
       "      <td id=\"T_f5954_row13_col8\" class=\"data row13 col8\" >-6200.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_f5954_row14_col1\" class=\"data row14 col1\" >中炬高新</td>\n",
       "      <td id=\"T_f5954_row14_col2\" class=\"data row14 col2\" >3100.01</td>\n",
       "      <td id=\"T_f5954_row14_col3\" class=\"data row14 col3\" >150134</td>\n",
       "      <td id=\"T_f5954_row14_col4\" class=\"data row14 col4\" >1.71</td>\n",
       "      <td id=\"T_f5954_row14_col5\" class=\"data row14 col5\" >0.00</td>\n",
       "      <td id=\"T_f5954_row14_col6\" class=\"data row14 col6\" >0</td>\n",
       "      <td id=\"T_f5954_row14_col7\" class=\"data row14 col7\" >0.00</td>\n",
       "      <td id=\"T_f5954_row14_col8\" class=\"data row14 col8\" >-3100.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x7fb73b3ddb80>"
      ]
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 自定义函数封装"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "source": [
    "def compare(code,years,s1,s2):\n",
    "    \"\"\"\n",
    "    code,str,基金代码;\n",
    "    years,list,年份列表,['yr1','yr2','……'];\n",
    "    s1,str,靠前的季度, 格式为 'YYYYQ1',例如: '2021Q2';\n",
    "    s2,str,靠后的季度, 格式为 'YYYYQ1',例如: '2021Q2';\n",
    "    注意，s1和s2的年份应在 years 里\n",
    "    \"\"\"\n",
    "    \n",
    "    s1_share = s1+'持股数'\n",
    "    s2_share = s2+'持股数'\n",
    "    s1_value = s1+'持仓市值'\n",
    "    s2_value = s2+'持仓市值'\n",
    "    s1_ratio = s1+'持仓比例'\n",
    "    s2_ratio = s2+'持仓比例'\n",
    "\n",
    "    data = pd.DataFrame()\n",
    "    for yr in years:\n",
    "        df_tmp = ak.fund_em_portfolio_hold(code=code,year=yr)\n",
    "        data = data.append(df_tmp)\n",
    "\n",
    "    data['季度']=data['季度'].apply(lambda x:x[:6])\n",
    "    data['季度'] = data['季度'].str.replace('年','Q')\n",
    "    data['占净值比例'] = pd.to_numeric(data['占净值比例'])\n",
    "\n",
    "    df1 =data[data['季度']==s1]\n",
    "    df1 = df1[['股票代码', '股票名称','持股数','持仓市值','占净值比例']]\n",
    "    df1 = df1.rename(columns={'持股数':s1_share,'持仓市值':s1_value,'占净值比例':s1_ratio})\n",
    "    df2 =data[data['季度']==s2]\n",
    "    df2 = df2[['股票代码', '股票名称','持股数','持仓市值','占净值比例']]\n",
    "    df2 = df2.rename(columns={'持股数':s2_share,'持仓市值':s2_value,'占净值比例':s2_ratio})\n",
    "    \n",
    "    df_merge = pd.merge(df1,df2,on='股票代码',how='outer')\n",
    "\n",
    "    # Q2 和 Q4，即半年度和年度报告，是需要披露全部持仓的\n",
    "    # 合并后，在dataframe 中 NaN 的数据应为 0 \n",
    "\n",
    "    if s1.endswith('Q2') or s1.endswith('Q4'):\n",
    "        df_merge[s1_share] = df_merge[s1_share].fillna(0)\n",
    "        df_merge[s1_value] = df_merge[s1_value].fillna(0)\n",
    "        df_merge[s1_ratio] = df_merge[s1_ratio].fillna(0)\n",
    "\n",
    "    if s2.endswith('Q2') or s2.endswith('Q4'):\n",
    "        df_merge[s2_share] = df_merge[s2_share].fillna(0)\n",
    "        df_merge[s2_value] = df_merge[s2_value].fillna(0)\n",
    "        df_merge[s2_ratio] = df_merge[s2_ratio].fillna(0)\n",
    "\n",
    "\n",
    "    df_merge['持股数变化'] = df_merge[s2_share] - df_merge[s1_share]\n",
    "    df_merge = df_merge.sort_values(s2_value,ascending=False)\n",
    "\n",
    "\n",
    "    df_merge['股票名称'] = df_merge['股票名称_y']\n",
    "    # df_merge['股票名称'] = df_merge['股票名称'].fillna('0')\n",
    "    # df_merge.loc[df_merge['股票名称']=='0','股票名称'] = df_merge.loc[df_merge['股票名称']=='0','股票名称_x']\n",
    "    df_merge.loc[df_merge['股票名称'].isna(),'股票名称'] = df_merge.loc[df_merge['股票名称'].isna(),'股票名称_x']\n",
    "    df_merge = df_merge[['股票代码', '股票名称', s1_share, \n",
    "                         s1_value, s1_ratio, \n",
    "                         s2_share,s2_value, \n",
    "                         s2_ratio, '持股数变化']]\n",
    "    return df_merge"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "source": [
    "code = \"005827\"\n",
    "years = ['2020','2021']\n",
    "s1 =  '2020Q3' \n",
    "s2 = '2021Q1'\n",
    "s1_share = s1+'持股数'\n",
    "s2_share = s2+'持股数'\n",
    "s1_value = s1+'持仓市值'\n",
    "s2_value = s2+'持仓市值'\n",
    "s1_ratio = s1+'持仓比例'\n",
    "s2_ratio = s2+'持仓比例'\n",
    "\n",
    "df_merge = compare(code,years,s1,s2)\n",
    "\n",
    "format_dict = {s1_share: '{0:.2f}', s2_share: '{0:.2f}', \n",
    "               s1_value: '{0:.0f}', s2_value: '{0:.0f}',\n",
    "               s1_ratio: '{0:.2f}', s2_ratio: '{0:.2f}', \n",
    "               '持股数变化': '{0:.2f}'}\n",
    "\n",
    "df_merge.style.hide_index()\\\n",
    "                .hide_columns(['股票代码'])\\\n",
    "                .format(format_dict)\\\n",
    "                .bar(subset=['持股数变化'],color=['#99ff66','#ee7621'],align='mid')\n"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_65c50_row0_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 36.5%, transparent 36.5%);\n",
       "}\n",
       "#T_65c50_row1_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 25.7%, transparent 25.7%);\n",
       "}\n",
       "#T_65c50_row2_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 6.1%, transparent 6.1%);\n",
       "}\n",
       "#T_65c50_row3_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 49.3%, transparent 49.3%);\n",
       "}\n",
       "#T_65c50_row4_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 18.5%, transparent 18.5%);\n",
       "}\n",
       "#T_65c50_row5_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 14.3%, transparent 14.3%);\n",
       "}\n",
       "#T_65c50_row7_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg, transparent 1.6%, #ee7621 1.6%, #ee7621 100.0%, transparent 100.0%);\n",
       "}\n",
       "#T_65c50_row8_col8 {\n",
       "  width: 10em;\n",
       "  height: 80%;\n",
       "  background: linear-gradient(90deg,#99ff66 1.6%, transparent 1.6%);\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_65c50_\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"col_heading level0 col1\" >股票名称</th>\n",
       "      <th class=\"col_heading level0 col2\" >2020Q3持股数</th>\n",
       "      <th class=\"col_heading level0 col3\" >2020Q3持仓市值</th>\n",
       "      <th class=\"col_heading level0 col4\" >2020Q3持仓比例</th>\n",
       "      <th class=\"col_heading level0 col5\" >2021Q1持股数</th>\n",
       "      <th class=\"col_heading level0 col6\" >2021Q1持仓市值</th>\n",
       "      <th class=\"col_heading level0 col7\" >2021Q1持仓比例</th>\n",
       "      <th class=\"col_heading level0 col8\" >持股数变化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row0_col1\" class=\"data row0 col1\" >五粮液</td>\n",
       "      <td id=\"T_65c50_row0_col2\" class=\"data row0 col2\" >1454.71</td>\n",
       "      <td id=\"T_65c50_row0_col3\" class=\"data row0 col3\" >321491</td>\n",
       "      <td id=\"T_65c50_row0_col4\" class=\"data row0 col4\" >9.47</td>\n",
       "      <td id=\"T_65c50_row0_col5\" class=\"data row0 col5\" >3300.00</td>\n",
       "      <td id=\"T_65c50_row0_col6\" class=\"data row0 col6\" >884334</td>\n",
       "      <td id=\"T_65c50_row0_col7\" class=\"data row0 col7\" >10.05</td>\n",
       "      <td id=\"T_65c50_row0_col8\" class=\"data row0 col8\" >1845.29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row1_col1\" class=\"data row1 col1\" >香港交易所</td>\n",
       "      <td id=\"T_65c50_row1_col2\" class=\"data row1 col2\" >1012.26</td>\n",
       "      <td id=\"T_65c50_row1_col3\" class=\"data row1 col3\" >321819</td>\n",
       "      <td id=\"T_65c50_row1_col4\" class=\"data row1 col4\" >9.48</td>\n",
       "      <td id=\"T_65c50_row1_col5\" class=\"data row1 col5\" >2286.00</td>\n",
       "      <td id=\"T_65c50_row1_col6\" class=\"data row1 col6\" >883734</td>\n",
       "      <td id=\"T_65c50_row1_col7\" class=\"data row1 col7\" >10.04</td>\n",
       "      <td id=\"T_65c50_row1_col8\" class=\"data row1 col8\" >1273.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row2_col1\" class=\"data row2 col1\" >贵州茅台</td>\n",
       "      <td id=\"T_65c50_row2_col2\" class=\"data row2 col2\" >193.56</td>\n",
       "      <td id=\"T_65c50_row2_col3\" class=\"data row2 col3\" >322951</td>\n",
       "      <td id=\"T_65c50_row2_col4\" class=\"data row2 col4\" >9.52</td>\n",
       "      <td id=\"T_65c50_row2_col5\" class=\"data row2 col5\" >432.00</td>\n",
       "      <td id=\"T_65c50_row2_col6\" class=\"data row2 col6\" >867888</td>\n",
       "      <td id=\"T_65c50_row2_col7\" class=\"data row2 col7\" >9.86</td>\n",
       "      <td id=\"T_65c50_row2_col8\" class=\"data row2 col8\" >238.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row3_col1\" class=\"data row3 col1\" >美团-W</td>\n",
       "      <td id=\"T_65c50_row3_col2\" class=\"data row3 col2\" >850.00</td>\n",
       "      <td id=\"T_65c50_row3_col3\" class=\"data row3 col3\" >180603</td>\n",
       "      <td id=\"T_65c50_row3_col4\" class=\"data row3 col4\" >5.32</td>\n",
       "      <td id=\"T_65c50_row3_col5\" class=\"data row3 col5\" >3370.43</td>\n",
       "      <td id=\"T_65c50_row3_col6\" class=\"data row3 col6\" >849458</td>\n",
       "      <td id=\"T_65c50_row3_col7\" class=\"data row3 col7\" >9.65</td>\n",
       "      <td id=\"T_65c50_row3_col8\" class=\"data row3 col8\" >2520.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row4_col1\" class=\"data row4 col1\" >腾讯控股</td>\n",
       "      <td id=\"T_65c50_row4_col2\" class=\"data row4 col2\" >718.40</td>\n",
       "      <td id=\"T_65c50_row4_col3\" class=\"data row4 col3\" >322896</td>\n",
       "      <td id=\"T_65c50_row4_col4\" class=\"data row4 col4\" >9.51</td>\n",
       "      <td id=\"T_65c50_row4_col5\" class=\"data row4 col5\" >1610.00</td>\n",
       "      <td id=\"T_65c50_row4_col6\" class=\"data row4 col6\" >830051</td>\n",
       "      <td id=\"T_65c50_row4_col7\" class=\"data row4 col7\" >9.43</td>\n",
       "      <td id=\"T_65c50_row4_col8\" class=\"data row4 col8\" >891.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row5_col1\" class=\"data row5 col1\" >泸州老窖</td>\n",
       "      <td id=\"T_65c50_row5_col2\" class=\"data row5 col2\" >2307.85</td>\n",
       "      <td id=\"T_65c50_row5_col3\" class=\"data row5 col3\" >331292</td>\n",
       "      <td id=\"T_65c50_row5_col4\" class=\"data row5 col4\" >9.76</td>\n",
       "      <td id=\"T_65c50_row5_col5\" class=\"data row5 col5\" >2980.00</td>\n",
       "      <td id=\"T_65c50_row5_col6\" class=\"data row5 col6\" >670561</td>\n",
       "      <td id=\"T_65c50_row5_col7\" class=\"data row5 col7\" >7.62</td>\n",
       "      <td id=\"T_65c50_row5_col8\" class=\"data row5 col8\" >672.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row6_col1\" class=\"data row6 col1\" >招商银行</td>\n",
       "      <td id=\"T_65c50_row6_col2\" class=\"data row6 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row6_col3\" class=\"data row6 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row6_col4\" class=\"data row6 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row6_col5\" class=\"data row6 col5\" >11300.00</td>\n",
       "      <td id=\"T_65c50_row6_col6\" class=\"data row6 col6\" >577430</td>\n",
       "      <td id=\"T_65c50_row6_col7\" class=\"data row6 col7\" >6.56</td>\n",
       "      <td id=\"T_65c50_row6_col8\" class=\"data row6 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row7_col1\" class=\"data row7 col1\" >海康威视</td>\n",
       "      <td id=\"T_65c50_row7_col2\" class=\"data row7 col2\" >3800.01</td>\n",
       "      <td id=\"T_65c50_row7_col3\" class=\"data row7 col3\" >144818</td>\n",
       "      <td id=\"T_65c50_row7_col4\" class=\"data row7 col4\" >4.27</td>\n",
       "      <td id=\"T_65c50_row7_col5\" class=\"data row7 col5\" >9000.02</td>\n",
       "      <td id=\"T_65c50_row7_col6\" class=\"data row7 col6\" >503101</td>\n",
       "      <td id=\"T_65c50_row7_col7\" class=\"data row7 col7\" >5.72</td>\n",
       "      <td id=\"T_65c50_row7_col8\" class=\"data row7 col8\" >5200.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row8_col1\" class=\"data row8 col1\" >洋河股份</td>\n",
       "      <td id=\"T_65c50_row8_col2\" class=\"data row8 col2\" >2585.00</td>\n",
       "      <td id=\"T_65c50_row8_col3\" class=\"data row8 col3\" >323099</td>\n",
       "      <td id=\"T_65c50_row8_col4\" class=\"data row8 col4\" >9.52</td>\n",
       "      <td id=\"T_65c50_row8_col5\" class=\"data row8 col5\" >2500.02</td>\n",
       "      <td id=\"T_65c50_row8_col6\" class=\"data row8 col6\" >411753</td>\n",
       "      <td id=\"T_65c50_row8_col7\" class=\"data row8 col7\" >4.68</td>\n",
       "      <td id=\"T_65c50_row8_col8\" class=\"data row8 col8\" >-84.98</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row9_col1\" class=\"data row9 col1\" >平安银行</td>\n",
       "      <td id=\"T_65c50_row9_col2\" class=\"data row9 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row9_col3\" class=\"data row9 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row9_col4\" class=\"data row9 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row9_col5\" class=\"data row9 col5\" >13000.00</td>\n",
       "      <td id=\"T_65c50_row9_col6\" class=\"data row9 col6\" >286130</td>\n",
       "      <td id=\"T_65c50_row9_col7\" class=\"data row9 col7\" >3.25</td>\n",
       "      <td id=\"T_65c50_row9_col8\" class=\"data row9 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row10_col1\" class=\"data row10 col1\" >招商银行</td>\n",
       "      <td id=\"T_65c50_row10_col2\" class=\"data row10 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row10_col3\" class=\"data row10 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row10_col4\" class=\"data row10 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row10_col5\" class=\"data row10 col5\" >5000.00</td>\n",
       "      <td id=\"T_65c50_row10_col6\" class=\"data row10 col6\" >250807</td>\n",
       "      <td id=\"T_65c50_row10_col7\" class=\"data row10 col7\" >2.85</td>\n",
       "      <td id=\"T_65c50_row10_col8\" class=\"data row10 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row11_col1\" class=\"data row11 col1\" >华兰生物</td>\n",
       "      <td id=\"T_65c50_row11_col2\" class=\"data row11 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row11_col3\" class=\"data row11 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row11_col4\" class=\"data row11 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row11_col5\" class=\"data row11 col5\" >6200.01</td>\n",
       "      <td id=\"T_65c50_row11_col6\" class=\"data row11 col6\" >246450</td>\n",
       "      <td id=\"T_65c50_row11_col7\" class=\"data row11 col7\" >2.80</td>\n",
       "      <td id=\"T_65c50_row11_col8\" class=\"data row11 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row12_col1\" class=\"data row12 col1\" >美年健康</td>\n",
       "      <td id=\"T_65c50_row12_col2\" class=\"data row12 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row12_col3\" class=\"data row12 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row12_col4\" class=\"data row12 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row12_col5\" class=\"data row12 col5\" >10660.01</td>\n",
       "      <td id=\"T_65c50_row12_col6\" class=\"data row12 col6\" >164377</td>\n",
       "      <td id=\"T_65c50_row12_col7\" class=\"data row12 col7\" >1.87</td>\n",
       "      <td id=\"T_65c50_row12_col8\" class=\"data row12 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row13_col1\" class=\"data row13 col1\" >中炬高新</td>\n",
       "      <td id=\"T_65c50_row13_col2\" class=\"data row13 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row13_col3\" class=\"data row13 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row13_col4\" class=\"data row13 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row13_col5\" class=\"data row13 col5\" >3100.01</td>\n",
       "      <td id=\"T_65c50_row13_col6\" class=\"data row13 col6\" >150134</td>\n",
       "      <td id=\"T_65c50_row13_col7\" class=\"data row13 col7\" >1.71</td>\n",
       "      <td id=\"T_65c50_row13_col8\" class=\"data row13 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row14_col1\" class=\"data row14 col1\" >天坛生物</td>\n",
       "      <td id=\"T_65c50_row14_col2\" class=\"data row14 col2\" >nan</td>\n",
       "      <td id=\"T_65c50_row14_col3\" class=\"data row14 col3\" >nan</td>\n",
       "      <td id=\"T_65c50_row14_col4\" class=\"data row14 col4\" >nan</td>\n",
       "      <td id=\"T_65c50_row14_col5\" class=\"data row14 col5\" >1600.01</td>\n",
       "      <td id=\"T_65c50_row14_col6\" class=\"data row14 col6\" >52256</td>\n",
       "      <td id=\"T_65c50_row14_col7\" class=\"data row14 col7\" >0.59</td>\n",
       "      <td id=\"T_65c50_row14_col8\" class=\"data row14 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row15_col1\" class=\"data row15 col1\" >爱尔眼科</td>\n",
       "      <td id=\"T_65c50_row15_col2\" class=\"data row15 col2\" >3200.00</td>\n",
       "      <td id=\"T_65c50_row15_col3\" class=\"data row15 col3\" >164544</td>\n",
       "      <td id=\"T_65c50_row15_col4\" class=\"data row15 col4\" >4.85</td>\n",
       "      <td id=\"T_65c50_row15_col5\" class=\"data row15 col5\" >nan</td>\n",
       "      <td id=\"T_65c50_row15_col6\" class=\"data row15 col6\" >nan</td>\n",
       "      <td id=\"T_65c50_row15_col7\" class=\"data row15 col7\" >nan</td>\n",
       "      <td id=\"T_65c50_row15_col8\" class=\"data row15 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row16_col1\" class=\"data row16 col1\" >中国生物制药</td>\n",
       "      <td id=\"T_65c50_row16_col2\" class=\"data row16 col2\" >20000.00</td>\n",
       "      <td id=\"T_65c50_row16_col3\" class=\"data row16 col3\" >148328</td>\n",
       "      <td id=\"T_65c50_row16_col4\" class=\"data row16 col4\" >4.37</td>\n",
       "      <td id=\"T_65c50_row16_col5\" class=\"data row16 col5\" >nan</td>\n",
       "      <td id=\"T_65c50_row16_col6\" class=\"data row16 col6\" >nan</td>\n",
       "      <td id=\"T_65c50_row16_col7\" class=\"data row16 col7\" >nan</td>\n",
       "      <td id=\"T_65c50_row16_col8\" class=\"data row16 col8\" >nan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td id=\"T_65c50_row17_col1\" class=\"data row17 col1\" >水井坊</td>\n",
       "      <td id=\"T_65c50_row17_col2\" class=\"data row17 col2\" >800.00</td>\n",
       "      <td id=\"T_65c50_row17_col3\" class=\"data row17 col3\" >51600</td>\n",
       "      <td id=\"T_65c50_row17_col4\" class=\"data row17 col4\" >1.52</td>\n",
       "      <td id=\"T_65c50_row17_col5\" class=\"data row17 col5\" >nan</td>\n",
       "      <td id=\"T_65c50_row17_col6\" class=\"data row17 col6\" >nan</td>\n",
       "      <td id=\"T_65c50_row17_col7\" class=\"data row17 col7\" >nan</td>\n",
       "      <td id=\"T_65c50_row17_col8\" class=\"data row17 col8\" >nan</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x7fb73bd3ebe0>"
      ]
     },
     "metadata": {},
     "execution_count": 8
    }
   ],
   "metadata": {
    "scrolled": false
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 多只基金持仓"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "source": [
    "# 获取单只基金的十大股票名称信息\n",
    "def fund_stock_holding(years,code):\n",
    "    data = pd.DataFrame()\n",
    "    for yr in years:\n",
    "        df_tmp = ak.fund_em_portfolio_hold(code=code,year=yr)\n",
    "        data = data.append(df_tmp)\n",
    "\n",
    "#     data['季度']=data['季度'].apply(lambda x:x[:8])\n",
    "    data['季度']=data['季度'].apply(lambda x:x[:6])\n",
    "    data['季度'] = data['季度'].str.replace('年','Q')\n",
    "    data['占净值比例'] = pd.to_numeric(data['占净值比例'])\n",
    "    \n",
    "    # 序号 中，有些是字符串，并且包含字符 “*”，需要替换，最后转换为数字\n",
    "    data['序号'] = data['序号'].astype(str)\n",
    "    data['序号'] = data['序号'].str.replace('\\*','',regex=True)\n",
    "    data['序号'] = pd.to_numeric(data['序号'])\n",
    "    \n",
    "    data = data.sort_values(['季度','持仓市值'],ascending=[True,False])\n",
    "    df = data.set_index(['序号','季度']).stack().unstack([1,2]).head(10)\n",
    "    # df1.loc[:,(slice(None), ['股票名称','占净值比例'])]\n",
    "    df = df.loc[:,(slice(None), '股票名称')]  # 只选取 股票名称\n",
    "    df = df.droplevel(None,axis=1)\n",
    "    df.columns.name=None\n",
    "    df = df.reset_index()\n",
    "#     df.index.name = None\n",
    "    df['基金代码'] = code\n",
    "    cols = df.columns.tolist()\n",
    "    cols = cols[:1] + cols[-1:] + cols[1:-1]  # 将基金代码列名放前面\n",
    "    df = df[cols]\n",
    "    return df"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "source": [
    "years = ['2019','2020','2021']\n",
    "df3 = fund_stock_holding(years,'005827')\n",
    "df3"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>2019Q1</th>\n",
       "      <th>2019Q2</th>\n",
       "      <th>2019Q3</th>\n",
       "      <th>2019Q4</th>\n",
       "      <th>2020Q1</th>\n",
       "      <th>2020Q2</th>\n",
       "      <th>2020Q3</th>\n",
       "      <th>2020Q4</th>\n",
       "      <th>2021Q1</th>\n",
       "      <th>2021Q2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>005827</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>香港交易所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>005827</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>洋河股份</td>\n",
       "      <td>美团-W</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>五粮液</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>005827</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>洋河股份</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>腾讯控股</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>005827</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>美团-W</td>\n",
       "      <td>贵州茅台</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>005827</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>腾讯控股</td>\n",
       "      <td>泸州老窖</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>005827</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>美团-W</td>\n",
       "      <td>五粮液</td>\n",
       "      <td>香港交易所</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>洋河股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>005827</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>药明生物</td>\n",
       "      <td>石药集团</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>美团-W</td>\n",
       "      <td>泸州老窖</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>美团-W</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>005827</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>药明生物</td>\n",
       "      <td>药明生物</td>\n",
       "      <td>药明生物</td>\n",
       "      <td>爱尔眼科</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>招商银行</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>005827</td>\n",
       "      <td>中国民航信息网络</td>\n",
       "      <td>白云机场</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>华兰生物</td>\n",
       "      <td>石药集团</td>\n",
       "      <td>天坛生物</td>\n",
       "      <td>中国生物制药</td>\n",
       "      <td>爱尔眼科</td>\n",
       "      <td>洋河股份</td>\n",
       "      <td>海康威视</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>005827</td>\n",
       "      <td>NaN</td>\n",
       "      <td>山西汾酒</td>\n",
       "      <td>NaN</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>爱尔眼科</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>颐海国际</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>招商银行</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   序号    基金代码    2019Q1  2019Q2  2019Q3  2019Q4  2020Q1  2020Q2  2020Q3  \\\n",
       "0   1  005827       五粮液    泸州老窖    贵州茅台    腾讯控股    腾讯控股   香港交易所    泸州老窖   \n",
       "1   2  005827      贵州茅台  中国生物制药  中国生物制药    泸州老窖    贵州茅台    腾讯控股    洋河股份   \n",
       "2   3  005827      泸州老窖     五粮液     五粮液  中国生物制药    泸州老窖     五粮液    贵州茅台   \n",
       "3   4  005827      腾讯控股    贵州茅台    泸州老窖     五粮液     五粮液    贵州茅台    腾讯控股   \n",
       "4   5  005827     香港交易所    腾讯控股    腾讯控股    贵州茅台  中国生物制药    泸州老窖   香港交易所   \n",
       "5   6  005827    中国生物制药   香港交易所   香港交易所   香港交易所   香港交易所    美团-W     五粮液   \n",
       "6   7  005827      华兰生物    上海机场    药明生物    石药集团    华兰生物  中国生物制药    美团-W   \n",
       "7   8  005827      上海机场    华兰生物    华兰生物    药明生物    药明生物    药明生物    爱尔眼科   \n",
       "8   9  005827  中国民航信息网络    白云机场    上海机场    华兰生物    石药集团    天坛生物  中国生物制药   \n",
       "9  10  005827       NaN    山西汾酒     NaN    上海机场    上海机场    爱尔眼科    海康威视   \n",
       "\n",
       "  2020Q4 2021Q1 2021Q2  \n",
       "0   贵州茅台    五粮液  香港交易所  \n",
       "1   美团-W  香港交易所    五粮液  \n",
       "2   洋河股份   贵州茅台   腾讯控股  \n",
       "3   腾讯控股   美团-W   贵州茅台  \n",
       "4    五粮液   腾讯控股   泸州老窖  \n",
       "5  香港交易所   泸州老窖   洋河股份  \n",
       "6   泸州老窖   招商银行   美团-W  \n",
       "7   海康威视   海康威视   招商银行  \n",
       "8   爱尔眼科   洋河股份   海康威视  \n",
       "9   颐海国际   平安银行   招商银行  "
      ]
     },
     "metadata": {},
     "execution_count": 10
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "source": [
    "codes = ['005669','006281','003956','001532',\n",
    "         '001714','001054','001809','003853',\n",
    "         '004890','001125','001808']\n",
    "df = pd.DataFrame()\n",
    "for code in codes:\n",
    "    df_tmp = fund_stock_holding(years,code)\n",
    "    df = df.append(df_tmp)\n",
    "df"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>2019Q1</th>\n",
       "      <th>2019Q2</th>\n",
       "      <th>2019Q3</th>\n",
       "      <th>2019Q4</th>\n",
       "      <th>2020Q1</th>\n",
       "      <th>2020Q2</th>\n",
       "      <th>2020Q3</th>\n",
       "      <th>2020Q4</th>\n",
       "      <th>2021Q1</th>\n",
       "      <th>2021Q2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>005669</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>晶澳科技</td>\n",
       "      <td>比亚迪</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>比亚迪股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>005669</td>\n",
       "      <td>白云机场</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>信义光能</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>永兴材料</td>\n",
       "      <td>亿纬锂能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>005669</td>\n",
       "      <td>中国移动</td>\n",
       "      <td>香港宽频</td>\n",
       "      <td>深圳燃气</td>\n",
       "      <td>华润燃气</td>\n",
       "      <td>中国移动</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>隆基股份</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>东方日升</td>\n",
       "      <td>中科电气</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>005669</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>深圳燃气</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>深圳高速公路股份</td>\n",
       "      <td>隆基股份</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>星源材质</td>\n",
       "      <td>星源材质</td>\n",
       "      <td>宁德时代</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>005669</td>\n",
       "      <td>香港宽频</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>阳光电源</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>天合光能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>001808</td>\n",
       "      <td>纳思达</td>\n",
       "      <td>中顺洁柔</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>蓝思科技</td>\n",
       "      <td>国联股份</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>科沃斯</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>士兰微</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>001808</td>\n",
       "      <td>易华录</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>芒果超媒</td>\n",
       "      <td>兆易创新</td>\n",
       "      <td>完美世界</td>\n",
       "      <td>TCL科技</td>\n",
       "      <td>新易盛</td>\n",
       "      <td>中科创达</td>\n",
       "      <td>兴业银行</td>\n",
       "      <td>天奈科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>001808</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>闻泰科技</td>\n",
       "      <td>思创医惠</td>\n",
       "      <td>汇顶科技</td>\n",
       "      <td>煌上煌</td>\n",
       "      <td>宁德时代</td>\n",
       "      <td>捷佳伟创</td>\n",
       "      <td>吉比特</td>\n",
       "      <td>石头科技</td>\n",
       "      <td>科大讯飞</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>001808</td>\n",
       "      <td>国轩高科</td>\n",
       "      <td>光环新网</td>\n",
       "      <td>宝信软件</td>\n",
       "      <td>璞泰来</td>\n",
       "      <td>浪潮信息</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>伊利股份</td>\n",
       "      <td>爱康科技</td>\n",
       "      <td>金山办公</td>\n",
       "      <td>石头科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>001808</td>\n",
       "      <td>南极电商</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>菲利华</td>\n",
       "      <td>吉比特</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>通威股份</td>\n",
       "      <td>福斯特</td>\n",
       "      <td>杉杉股份</td>\n",
       "      <td>阳光电源</td>\n",
       "      <td>金博股份</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    序号    基金代码 2019Q1 2019Q2 2019Q3    2019Q4 2020Q1 2020Q2 2020Q3 2020Q4  \\\n",
       "0    1  005669   长江电力   长江电力   国投电力      长江电力   长江电力   长江电力   晶澳科技    比亚迪   \n",
       "1    2  005669   白云机场   国投电力   长江电力      上海机场   华测检测   华测检测   信义光能   中科电气   \n",
       "2    3  005669   中国移动   香港宽频   深圳燃气      华润燃气   中国移动   国投电力   隆基股份   亿纬锂能   \n",
       "3    4  005669   粤高速A   深圳燃气   粤高速A  深圳高速公路股份   隆基股份   上海机场   长江电力   星源材质   \n",
       "4    5  005669   香港宽频   粤高速A   川投能源      华测检测   川投能源   川投能源   中科电气   阳光电源   \n",
       "..  ..     ...    ...    ...    ...       ...    ...    ...    ...    ...   \n",
       "5    6  001808    纳思达   中顺洁柔   海康威视      中科电气   蓝思科技   国联股份   亿纬锂能    科沃斯   \n",
       "6    7  001808    易华录   招商银行   芒果超媒      兆易创新   完美世界  TCL科技    新易盛   中科创达   \n",
       "7    8  001808   中新赛克   闻泰科技   思创医惠      汇顶科技    煌上煌   宁德时代   捷佳伟创    吉比特   \n",
       "8    9  001808   国轩高科   光环新网   宝信软件       璞泰来   浪潮信息   亿纬锂能   伊利股份   爱康科技   \n",
       "9   10  001808   南极电商   中新赛克    菲利华       吉比特   中新赛克   通威股份    福斯特   杉杉股份   \n",
       "\n",
       "   2021Q1 2021Q2  \n",
       "0    中科电气  比亚迪股份  \n",
       "1    永兴材料   亿纬锂能  \n",
       "2    东方日升   中科电气  \n",
       "3    星源材质   宁德时代  \n",
       "4    亿纬锂能   天合光能  \n",
       "..    ...    ...  \n",
       "5    亿纬锂能    士兰微  \n",
       "6    兴业银行   天奈科技  \n",
       "7    石头科技   科大讯飞  \n",
       "8    金山办公   石头科技  \n",
       "9    阳光电源   金博股份  \n",
       "\n",
       "[110 rows x 12 columns]"
      ]
     },
     "metadata": {},
     "execution_count": 11
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "source": [
    "# 获取基金名称信息\n",
    "df_fund_info = ak.fund_em_fund_name()\n",
    "df_fund_info = df_fund_info.query('基金代码 in @codes')\n",
    "df_fund_info = df_fund_info[['基金代码','基金简称']]\n",
    "df_fund_info = df_fund_info.reset_index(drop=True)\n",
    "df_fund_info"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>001054</td>\n",
       "      <td>工银新金融股票A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>001125</td>\n",
       "      <td>博时互联网主题灵活配置混合</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>001532</td>\n",
       "      <td>华安文体健康混合A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>001714</td>\n",
       "      <td>工银文体产业股票A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>001808</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>001809</td>\n",
       "      <td>中信建投智信物联网A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>003853</td>\n",
       "      <td>金鹰信息产业股票A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>003956</td>\n",
       "      <td>南方教育股票</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>004890</td>\n",
       "      <td>中邮健康文娱混合</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>006281</td>\n",
       "      <td>万家人工智能混合</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      基金代码           基金简称\n",
       "0   001054       工银新金融股票A\n",
       "1   001125  博时互联网主题灵活配置混合\n",
       "2   001532      华安文体健康混合A\n",
       "3   001714      工银文体产业股票A\n",
       "4   001808  银华互联网主题灵活配置混合\n",
       "5   001809     中信建投智信物联网A\n",
       "6   003853      金鹰信息产业股票A\n",
       "7   003956         南方教育股票\n",
       "8   004890       中邮健康文娱混合\n",
       "9   005669     前海开源公用事业股票\n",
       "10  006281       万家人工智能混合"
      ]
     },
     "metadata": {},
     "execution_count": 12
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "source": [
    "df_fund = pd.merge(df,df_fund_info,on='基金代码')\n",
    "cols = df_fund.columns.tolist()\n",
    "cols = cols[:1] + cols[-1:] + cols[2:-1]  # 将基金简称放前面\n",
    "df_fund =df_fund[cols]\n",
    "df_fund"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>2019Q1</th>\n",
       "      <th>2019Q2</th>\n",
       "      <th>2019Q3</th>\n",
       "      <th>2019Q4</th>\n",
       "      <th>2020Q1</th>\n",
       "      <th>2020Q2</th>\n",
       "      <th>2020Q3</th>\n",
       "      <th>2020Q4</th>\n",
       "      <th>2021Q1</th>\n",
       "      <th>2021Q2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>晶澳科技</td>\n",
       "      <td>比亚迪</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>比亚迪股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>白云机场</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>信义光能</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>永兴材料</td>\n",
       "      <td>亿纬锂能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>中国移动</td>\n",
       "      <td>香港宽频</td>\n",
       "      <td>深圳燃气</td>\n",
       "      <td>华润燃气</td>\n",
       "      <td>中国移动</td>\n",
       "      <td>国投电力</td>\n",
       "      <td>隆基股份</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>东方日升</td>\n",
       "      <td>中科电气</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>深圳燃气</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>深圳高速公路股份</td>\n",
       "      <td>隆基股份</td>\n",
       "      <td>上海机场</td>\n",
       "      <td>长江电力</td>\n",
       "      <td>星源材质</td>\n",
       "      <td>星源材质</td>\n",
       "      <td>宁德时代</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>香港宽频</td>\n",
       "      <td>粤高速A</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>华测检测</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>川投能源</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>阳光电源</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>天合光能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>6</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "      <td>纳思达</td>\n",
       "      <td>中顺洁柔</td>\n",
       "      <td>海康威视</td>\n",
       "      <td>中科电气</td>\n",
       "      <td>蓝思科技</td>\n",
       "      <td>国联股份</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>科沃斯</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>士兰微</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>7</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "      <td>易华录</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>芒果超媒</td>\n",
       "      <td>兆易创新</td>\n",
       "      <td>完美世界</td>\n",
       "      <td>TCL科技</td>\n",
       "      <td>新易盛</td>\n",
       "      <td>中科创达</td>\n",
       "      <td>兴业银行</td>\n",
       "      <td>天奈科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>8</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>闻泰科技</td>\n",
       "      <td>思创医惠</td>\n",
       "      <td>汇顶科技</td>\n",
       "      <td>煌上煌</td>\n",
       "      <td>宁德时代</td>\n",
       "      <td>捷佳伟创</td>\n",
       "      <td>吉比特</td>\n",
       "      <td>石头科技</td>\n",
       "      <td>科大讯飞</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>9</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "      <td>国轩高科</td>\n",
       "      <td>光环新网</td>\n",
       "      <td>宝信软件</td>\n",
       "      <td>璞泰来</td>\n",
       "      <td>浪潮信息</td>\n",
       "      <td>亿纬锂能</td>\n",
       "      <td>伊利股份</td>\n",
       "      <td>爱康科技</td>\n",
       "      <td>金山办公</td>\n",
       "      <td>石头科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>109</th>\n",
       "      <td>10</td>\n",
       "      <td>银华互联网主题灵活配置混合</td>\n",
       "      <td>南极电商</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>菲利华</td>\n",
       "      <td>吉比特</td>\n",
       "      <td>中新赛克</td>\n",
       "      <td>通威股份</td>\n",
       "      <td>福斯特</td>\n",
       "      <td>杉杉股份</td>\n",
       "      <td>阳光电源</td>\n",
       "      <td>金博股份</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     序号           基金简称 2019Q1 2019Q2 2019Q3    2019Q4 2020Q1 2020Q2 2020Q3  \\\n",
       "0     1     前海开源公用事业股票   长江电力   长江电力   国投电力      长江电力   长江电力   长江电力   晶澳科技   \n",
       "1     2     前海开源公用事业股票   白云机场   国投电力   长江电力      上海机场   华测检测   华测检测   信义光能   \n",
       "2     3     前海开源公用事业股票   中国移动   香港宽频   深圳燃气      华润燃气   中国移动   国投电力   隆基股份   \n",
       "3     4     前海开源公用事业股票   粤高速A   深圳燃气   粤高速A  深圳高速公路股份   隆基股份   上海机场   长江电力   \n",
       "4     5     前海开源公用事业股票   香港宽频   粤高速A   川投能源      华测检测   川投能源   川投能源   中科电气   \n",
       "..   ..            ...    ...    ...    ...       ...    ...    ...    ...   \n",
       "105   6  银华互联网主题灵活配置混合    纳思达   中顺洁柔   海康威视      中科电气   蓝思科技   国联股份   亿纬锂能   \n",
       "106   7  银华互联网主题灵活配置混合    易华录   招商银行   芒果超媒      兆易创新   完美世界  TCL科技    新易盛   \n",
       "107   8  银华互联网主题灵活配置混合   中新赛克   闻泰科技   思创医惠      汇顶科技    煌上煌   宁德时代   捷佳伟创   \n",
       "108   9  银华互联网主题灵活配置混合   国轩高科   光环新网   宝信软件       璞泰来   浪潮信息   亿纬锂能   伊利股份   \n",
       "109  10  银华互联网主题灵活配置混合   南极电商   中新赛克    菲利华       吉比特   中新赛克   通威股份    福斯特   \n",
       "\n",
       "    2020Q4 2021Q1 2021Q2  \n",
       "0      比亚迪   中科电气  比亚迪股份  \n",
       "1     中科电气   永兴材料   亿纬锂能  \n",
       "2     亿纬锂能   东方日升   中科电气  \n",
       "3     星源材质   星源材质   宁德时代  \n",
       "4     阳光电源   亿纬锂能   天合光能  \n",
       "..     ...    ...    ...  \n",
       "105    科沃斯   亿纬锂能    士兰微  \n",
       "106   中科创达   兴业银行   天奈科技  \n",
       "107    吉比特   石头科技   科大讯飞  \n",
       "108   爱康科技   金山办公   石头科技  \n",
       "109   杉杉股份   阳光电源   金博股份  \n",
       "\n",
       "[110 rows x 12 columns]"
      ]
     },
     "metadata": {},
     "execution_count": 13
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "\n",
    "## 相关阅读\n",
    "\n",
    "1. [用Python来做一个投资计划](https://mp.weixin.qq.com/s/WYuMwCJBrWaBiDs8xp2KMA)\n",
    "2. [用Python快速追踪基金的收益情况](https://mp.weixin.qq.com/s/7w3Ned9M5FqRQd6inxmeRw)\n",
    "3. [视频：Plotly 和 Dash 在投资领域的应用](https://mp.weixin.qq.com/s/VopPrpe_64j5za4AYkmUTg)\n",
    "4. [视频：Plotly中绘制股票交易图表](https://mp.weixin.qq.com/s/1TUB2G-xavNm796uXUnRfQ)\n",
    "5. [Plotly中绘制三种经典的股票交易图表](https://mp.weixin.qq.com/s/1v3h5-5fNVk7cBdaRKzJkg)\n",
    "6. [神器Tushare，财经数据必备工具！](https://mp.weixin.qq.com/s/c1ukemeK12flCgA-lo69fA)\n",
    "7. [用 Python 读取巴菲特近期持仓数据](https://mp.weixin.qq.com/s/6h9Xq2lfrZSlRNw_W8aWcg)\n",
    "\n",
    "更多内容，请关注公众号「**Python数据之道**」：\n",
    "\n",
    "![](https://tva1.sinaimg.cn/large/008i3skNgy1gs2d9ca7dvj31hc0u07ng.jpg)"
   ],
   "metadata": {}
  }
 ],
 "metadata": {
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.8.2 64-bit ('base': conda)"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": true,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "interpreter": {
   "hash": "af31e066b2aa43ee7fb59c4d3c8952048b1ef7131eaf764b7c0ee6e38a206d9a"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}